void OnError (string msg) { ParseErrorHandler eh = events [errorEvent] as ParseErrorHandler; if (eh != null) eh (this, msg); }