MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | b6ac9f6 | 2020-01-21 11:11:16 +0100 | [diff] [blame] | 2 | void raise_error(string arg) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 3 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 4 | DESCRIPTION |
| 5 | Abort execution. If the current program execution was |
| 6 | initiated by catch(), that catch expression will return arg as |
| 7 | error code, else the arg will printed as error message. |
| 8 | |
| 9 | This is very similar to throw(), but while throw() is intended to be |
| 10 | called inside catch(), raise_error() can be called anywhere. |
| 11 | Furthermore, raise_error() includes the complete error handling |
| 12 | with generation of a stack backtrace, making it a very expensive |
| 13 | function. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 14 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 15 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 16 | catch(E), throw(E) |