Skip to content

Commit 2b319c2

Browse files
authored
Update README.md
1 parent c9806cd commit 2b319c2

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,44 @@ NO WARRANTIES, [MIT License](https://github.com/abapPM/ABAP-Error/blob/main/LICE
1212

1313
## Usage
1414

15-
...
15+
Raise exception with free form text:
16+
17+
```abap
18+
zcx_error=>raise( 'Not found' ).
19+
```
20+
21+
Raise exception with reference to another exception:
22+
23+
```abap
24+
TRY.
25+
"... some code that raises an exception
26+
CATCH cx_root INTO DATA(error).
27+
zcx_error=>raise_with_text( error ).
28+
" or
29+
zcx_error=>raise(
30+
text = 'Overwrite error text'
31+
previous = error ).
32+
ENDTRY.
33+
```
34+
35+
Raise exception with T100 system message:
36+
37+
```abap
38+
MESSAGE e001(00) WITH 'error value' 'more text' INTO zcx_error=>null. " or any other message
39+
zcx_error=>raise_t100( ).
40+
```
1641

1742
## Prerequisites
1843

19-
SAP Basis 7.40 or higher
44+
SAP Basis 7.50 or higher
2045

2146
## Installation
2247

23-
Import ABAP Error to your project using [apm](https://abappm.com).
48+
Install the `error` module in your system using [apm](https://abappm.com).
49+
50+
## Import
51+
52+
Specify the `error` module as a dependency in your project and import it to your namespace using [apm](https://abappm.com).
2453

2554
```abap
2655
IMPORT '*' TO 'z$1_your_project$2' FROM 'error'.

0 commit comments

Comments
 (0)