public void AddException(ExceptionType type, string name) { if (name == null) { return; } exceptionService.Add(new ExceptionInfoKey(type, name)); }
// For testing purposes only public ExceptionizerMessage Get(string productid) { var exception = new ExceptionizerMessage(); exception.ApiKey = "a6584184-14a6-4ddf-a652-0c86ac1d16e0"; exception.ClientSource = new ClientSource { Name = "local", Url = "http://ryantomlinson.com", Version = "0.1" }; exception.Environment = new Environment { OperatingSystem = "windows", Url = "http://exceptionizer.com", ProductVersion = "1.0.0", SourceEnvironment = "production" }; exception.UserInformation = new UserInformation { UserEmail = "*****@*****.**", UserId = "1235", UserName = "******" }; exception.Exceptions = new List <ExceptionizerException>() { new ExceptionizerException() { Message = "something gone wrong like", StackTrace = "this be the stacktracez", Type = "this be the type" } }; try { exceptionService.Add(exception); } catch (Exception) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent("An error occured trying to process your request. Please contact us for details [email protected]"), ReasonPhrase = "Critical Exception" }); } return(exception); }