Common Exception Methods Flashcards
1
Q
getCause
A
Returns the cause of the exception as an exception object.
2
Q
getLineNumber
A
Returns the line number from where the exception was thrown.
3
Q
getMessage
A
Returns the error message that displays for the user.
4
Q
getStackTraceString
A
Returns the stack trace as a string.
5
Q
getTypeName
A
Returns the type of exception, such as DmlException, ListException, MathException, and so on.
6
Q
initCause
A
Sets the cause for this exception, if one has not already been set.
7
Q
setMessage
A
Sets the error message that displays for the user.