Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

rethrow exception c++

try {
  // Block of code to try
  throw exception; // Throw an exception when a problem arise
}
catch (exception& e) {
  // Block to do something with the error (e.g. log it).
  throw; // This rethrows the error.
}
 
PREVIOUS NEXT
Tagged: #rethrow #exception
ADD COMMENT
Topic
Name
9+7 =