MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 2 | mixed heart_beat_error(object culprit, string err, string prg, |
| 3 | string curobj, int line, int caught) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 4 | |
| 5 | DESCRIPTION |
Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 6 | This function is called when a runtime error occurs while |
| 7 | executing the heart_beat() function of the object culprit. prg |
| 8 | is program where the actual error happened, in object curobj |
| 9 | at the given line. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 10 | |
Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 11 | At time of call, the heart_beat has been turned off. |
| 12 | Return anything != 0 to restart the heart_beat in culprit. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 13 | |
Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 14 | If culprit is a user, it should at least get the message "You |
| 15 | have no heartbeat". A more advanced handling would destruct |
| 16 | the offending object curobj and and allow the heartbeat to |
| 17 | restart. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 18 | |
Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 19 | If the error is caught on a higher level, <caught> is non-zero; |
| 20 | otherwise it is 0. |
| 21 | |
| 22 | Note that prg denotes the program actually executed (which |
| 23 | might be an inherited one) whereas curobj is just the |
| 24 | offending object. |
| 25 | |
| 26 | HISTORY |
| 27 | LDMud 3.2.12/3.3.705 added the <caught> argument. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 28 | |
| 29 | SEE ALSO |
Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 30 | set_heart_beat(E), heart_beat(A), runtime_error(M) |