TAW_12 Chapter 8, Class based exceptions Flashcards

1
Q

What is an exception?

A

A situation that arises when a program is executing from which there is no way or reason to continue

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

All exception classes are derived from CX_ROOT?

A

Yes, but it can not be directly used for a super class of an exception class

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

What is the default class for a exception class

A

CX_STATIC_CHECK

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

What three subclasses of CX_ROOT can be used as super classes for exception classes

A

CX_STATIC-CHECK
CX_NO_CHECK
CX_DYNAMIC_CHECK

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

When is the CLEANUP block executed?

A

Just before leaving the try block, this is used when the catch is handled in an outer try block

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

If an exception is raised during debugging, how can it be viewed

A

The EXCEPTION RAISED field is filled
In debugger the buttons Last Exception Object and Display Trigger Location can be used. This must be configed in settings. Otherwise the last exception buton does not appear if the INTO is missing from the catch statement

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

What default textid should always exist?

A

A default text with the name of the exception class itself.

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

What are the two variants of the raise exception?

A
RAISE EXCEPTION TYPE 
RAISE EXCEPTION (this is only useful for propagating the exception forward.  For example CATCH ZCX_ERROR into LCX_ERROR.  RAISE EXCEPTION LCX_ERROR)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

If TEXTID is not supplied when RAISE EXCEPTION TYPE, what happens

A

It will use the default which has the exception class name

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

Can the RAISING addition be used with FORMS as well as methods?

A

Yes and in function modules as well

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

When an exception is raised, processing continues from where

A

From the point of the catch. Even if the catch is levels above where the exception occurred. However, if a cleanup block exists in a try block before the handling, it happens first

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

Name the two main sub classes of CX_DYNAMIC_CHECK

A

CX_SY_ARITHMETIC_CHECK and CX_SY_MOVE_CAST_ERROR

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

Can CX_NO_CHECK exceptions be RAISED

A

No, they are system issued only

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

What is the difference between RETRY and RESUME

A

Retry starts at the top of the try block, resume starts at where the exception was raised

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

How can a exception be resumed

A

The exception must be caught with the BEFORE UNWIND

The exception must be raised with RAISE RESUMABLE The exception must be propagated with RESUMABLE(CX_CLASS)

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