Skip to content

abapPM/ABAP-Error

Repository files navigation

Version

License Contributor Covenant REUSE Status

Error

General purpose exception.

NO WARRANTIES, MIT License

Usage

Raise exception with free form text:

zcx_error=>raise( 'Not found' ).

Raise exception with reference to another exception:

TRY.
    "... some code that raises an exception
  CATCH cx_root INTO DATA(error).
    zcx_error=>raise_with_text( error ).
    " or
    zcx_error=>raise(
      text     = 'Overwrite error text'
      previous = error ).
ENDTRY.

Raise exception with T100 system message:

MESSAGE e001(00) WITH 'error value' 'more text' INTO zcx_error=>null. " or any other message
zcx_error=>raise_t100( ).

Prerequisites

SAP Basis 7.50 or higher

Installation

Install error as a global module in your system using apm.

or

Specify the error module as a dependency in your project and import it to your namespace using apm.

Contributions

All contributions are welcome! Read our Contribution Guidelines, fork this repo, and create a pull request.

You can install the developer version of ABAP Error using abapGit either by creating a new online repository for https://github.com/abapPM/ABAP-Error.

Recommended SAP package: $ERROR

About

Made with ❤ in Canada

Copyright 2025 apm.to Inc. https://apm.to

Follow @marcf.be on Blueksy and @marcfbe or LinkedIn

Releases

No releases published

Sponsor this project

 

Languages