예제 #1
0
        public static ErrorRecord GetGeneric(this Exception exception)
        {
            Contract.Requires(null != exception);
            Contract.Ensures(null != Contract.Result <ErrorRecord>());

            return(ErrorRecordFactory.GetGeneric(exception, exception.Message, null));
        }
예제 #2
0
        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));
        }