C++:
try{
...throw exceptionInstance;
...
}
catch(exceptionType){
...
}
python:
try:...
raise exceptionInstance of custom-defined exceptionType
...
except:exceptionType,exceptionInstance:
...
...
finally:
...
...
Python引发自定义的异常才会用到raise
C++:
try{
...}
python:
try:...
Python引发自定义的异常才会用到raise