A catch block is declared using the catch keyword. This specifies the type of exception object the clause is designed to handle, and the handler code itself.
SEHClause ::= |
---|
catch TypeReference HandlerBlock |
[Example:
.try {
… // protected instructions
leave exitSEH // normal exit
}
catch [mscorlib]System.FormatException {
… // handle the exception
pop // pop the exception object
leave exitSEH // leave catch handler
}
exitSEH: // continue here
end example]