Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2017-04-08 09:07:04
Size: 974
Editor: KaiJaeger
Comment:
Revision 4 as of 2018-03-03 11:45:46
Size: 111
Editor: KaiJaeger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Dyalog uses number to represent errors. Those errors are accessible via `⎕EN`. However, when one want to specify an error with a `:Trap` or a `⎕TRAP` statement then one must use integers.

Although a seasoned programmer will over time memorize the most important error numbers, the unusual ones will escape her.

There is a better solution to this: use symbolic names which are effectively constants (strictly speaking read-only variables) carrying the integer. That's that the `EventCode` class is for: it offers symbolic names for all trappable events up to and including version 15.0.

Examples:

{{{
      EventCodes.DEADLOCK
1008
      EventCodes.GetName 1008
DEADLOCK
}}}


For bug reports, future enhancements and a full version history see [[EventCodes/ProjectPage]]

||Original author: ||KaiJaeger ||
||Responsible: ||KaiJaeger ||
||Email: || kai@aplteam.com ||

<<Include(APLTreeDownloads)>>

----
CategoryAplTree
The project has been relocated to [[https://github.com/aplteam/EventCodes]] on 2018-03-03.

Event codes

The project has been relocated to https://github.com/aplteam/EventCodes on 2018-03-03.

EventCodes (last edited 2018-03-03 11:45:46 by KaiJaeger)