protected virtual void OnErrorOccurred(ClientErrorEventArgs e) { var handler = ErrorOccurred; if (handler != null) handler(this, e); }