The sequence for an error is usually:
error is triggered by looking up the error name in errordict and executing this procedure.
the errordict procedure calls signalerror, passing it the error name.
signalerror takes snapshots of the stacks, saving the snapshots in $error, and then calls stop.
...