public static Exception error(this object obj, Exception inner, string description) { var e = new InternalError(inner, objectize(obj, description)); obj.W("throwing " + e.Message); return e; }
/// Returns an exception instance that contains the context of the current object (usage: this.error()) public static Exception error(this object obj, string description, params object[] capturedData) { var e = new InternalError(objectize(obj, description), capturedData); obj.W("throwing " + e.Message); return e; }