using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace webapi.Infractructure.Exceptions { [Serializable] public class SPCustomException : Exception { public SPCustomException(string message) : base(message) { } public SPCustomException(string message, Exception ex) : base(string.Concat(message, "\r\n", ex.Message, "\r\n", ex.InnerException?.Message), ex.InnerException ?? ex) { } } }