Skip to Content
0
Former Member
Apr 10, 2008 at 07:30 PM

Using exceptions in SE24 global class Builder

827 Views

Hello all

I'm trying to learn how to use SE24 and I'm a bit stumped on handling exception.

Here's a trivial example showing what I'd like to do.

Can anyone tell me what's wrong. Or point me to a reference.

*& N1	TYPE INT1	Byte Value
*& N2	TYPE INT1	Byte Value
*& OUT	TYPE INT1	Byte Value
*& CX_SY_ARITHMETIC_ERROR		System Exception for Arithmetic Errors

METHOD mult2.
  data: exc type REF TO cx_sy_arithmetic_error .
  out = n1 * n2 .
  IF out > 9.
    RAISE EXCEPTION type exc
  ENDIF.
ENDMETHOD.