/// <summary> /// 异常返回值 /// </summary> /// <param name="context"></param> /// <param name="metadata"></param> /// <returns></returns> public IActionResult OnException(ExceptionContext context, ExceptionMetadata metadata) { return(new JsonResult(RESTfulResult(metadata.StatusCode, errors: metadata.Errors))); }
public void SetError(Exception e) { _ex = new ExceptionMetadata(e); }
public BusinessSpecificException(string msg, string otherExceptionProps, ExceptionMetadata exceptionMetadata) : base(msg) { _otherExceptionProps = otherExceptionProps; _exceptionMetadata = exceptionMetadata; }