public static ErrorRecord GetGeneric(this Exception exception) { Contract.Requires(null != exception); Contract.Ensures(null != Contract.Result <ErrorRecord>()); return(ErrorRecordFactory.GetGeneric(exception, exception.Message, null)); }
public static ErrorRecord GetGeneric(this Exception exception, string messageOrTemplate, params object[] objects) { Contract.Requires(null != exception); Contract.Requires(!string.IsNullOrWhiteSpace(messageOrTemplate)); Contract.Ensures(null != Contract.Result <ErrorRecord>()); return(ErrorRecordFactory.GetGeneric(exception, messageOrTemplate: exception.Message, objects: objects)); }