private string QueueException(string endpointKey, Exception ex, Controllers.ExecController.ExecOptions execOptions, string additionalInfo, string appTitle, string appVersion = null)
        {
            var ew = new ExceptionWrapper(ex, execOptions, additionalInfo, appTitle, appVersion)
            {
                EndpointKey = endpointKey
            };

            this.Enqueue(ew);
            return(ew.sId);
        }
        public static string LogException(Exception ex, Controllers.ExecController.ExecOptions execOptions, string additionalInfo = null, string appTitle = null, string appVersion = null)
        {
            string endpointKey = "Global";

            if (execOptions != null)
            {
                endpointKey = $"{execOptions.project}/{execOptions.application}/{execOptions.endpoint}".ToUpper();
            }

            return(Instance.QueueException(endpointKey, ex, execOptions, additionalInfo, appTitle, appVersion));
        }
Ejemplo n.º 3
0
        public static ApiResponse ExecException(Exception ex, Controllers.ExecController.ExecOptions execOptions, out string exceptionId, string additionalInfo = null, string appTitle = null, string appVersion = null)
        {
            exceptionId = ExceptionLogger.LogException(ex, execOptions, additionalInfo, appTitle, appVersion);

            var ret = new ApiResponse();

            ret.Message             = $"Error ref: {exceptionId}";
            ret.Type                = ApiResponseType.Exception;
            ret.Data                = new System.Dynamic.ExpandoObject();
            ((dynamic)ret.Data).Ref = exceptionId;

            return(ret);
        }
Ejemplo n.º 4
0
 public static void Exception(Exception ex, Controllers.ExecController.ExecOptions execOptions, params object[] args)
 {
     _log.Exception(ex, execOptions, args);
 }
Ejemplo n.º 5
0
 public ExceptionWrapper(Exception ex, Controllers.ExecController.ExecOptions eo, string additionalInfo = null, string appTitle = null, string appVersion = null)
     : this(ex, additionalInfo, appTitle, appVersion)
 {
     this.execOptions    = eo;
     this.additionalInfo = additionalInfo;
 }