ahyatt/emacs-websocket — pull request #28 by jscheid (2013-01-23 20:52:31+00:00)
Title: Improve error display in default error handler

- Pretty-print the error message, and include the error type. Previously, only the error arguments were printed so that e.g. `end-of-buffer` would be rendered just as `nil`. Pretty-printing makes the output of the default error handler consistent with default error output.

- Use `display-warning` rather than `message`. Rationale: the error handler might be called many times in quick succession, overwriting previous messages. Also, the messages output by the error handler might be overwritten by messages emitted by other parts of the code (e.g. by websocket callbacks invoked after the error occurred.)

Although past messages are always available in the `*Messages*` buffer, with `display-warning` errors are displayed more prominently since the `*Warnings*` buffer is unburied whenever new errors are printed.