allow ontologies to specify their own event handlers

Models can activate with error handlers that can be specified per call
to sm.error.  Global error handlers are supported, and default error
handling is supplied.