Common Exception Methods Flashcards

1
Q

getCause

A

Returns the cause of the exception as an exception object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

getLineNumber

A

Returns the line number from where the exception was thrown.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

getMessage

A

Returns the error message that displays for the user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

getStackTraceString

A

Returns the stack trace as a string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

getTypeName

A

Returns the type of exception, such as DmlException, ListException, MathException, and so on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

initCause

A

Sets the cause for this exception, if one has not already been set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

setMessage

A

Sets the error message that displays for the user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly