private void ReportError(object message, List <Delegate> callbacks = null) { // turn message into Error Exception exception = message is Exception ? message as Exception : new Exception(message.ToString()); // Report error throws an exception if we don't have a ERROR subscriber and if so // the callbacks will not get called _lifecycle.ReportError(exception); if (callbacks != null) { CallCallbacks(callbacks, exception); } }