Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow error mail report to be sent programmatically #27

Open
GoogleCodeExporter opened this issue May 30, 2015 · 6 comments
Open

Allow error mail report to be sent programmatically #27

GoogleCodeExporter opened this issue May 30, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

When the following code is executed:
Error error = new Error(ex, HttpContext.Current);
GotDotNet.Elmah.ErrorLog.Default.Log(error);

Include an option to perform the "errorMail" action either automatically
when .Log() is called or by specifying that an email should be sent in the
parameters.

See the discussion at:
http://groups.google.com/group/elmah/browse_thread/thread/b17cb4b5308b8013

Original issue reported on code.google.com by dgarcia...@gmail.com on 2 Aug 2007 at 10:33

@GoogleCodeExporter
Copy link
Author

Fixed subject and turned this into an enhancement.

Original comment by azizatif on 2 Aug 2007 at 10:49

  • Changed title: Allow error mail report to be sent programmatically
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Original comment by azizatif on 30 Oct 2007 at 9:22

  • Changed state: Accepted
  • Added labels: Component-Logic

@GoogleCodeExporter
Copy link
Author

This is now possible via the new ErrorSignal class. See:
http://elmah.googlecode.com/svn/trunk/src/Elmah/ErrorSignal.cs

Calling ErrorSignal.Raise will go through the same set of events as when an 
unhandled exception is encountered. In effect, you'll get logging plus mailing 
(even 
filtering) if that's what's configured. As a result, this issue is being 
considered 
fixed for now. If there are issues with ErrorSignal, these should be reported 
as new 
issues.

Original comment by azizatif on 30 Oct 2007 at 9:26

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Original comment by azizatif on 13 Sep 2012 at 3:51

  • Changed state: New

@GoogleCodeExporter
Copy link
Author

Hmm... Only problem with using ErrorSignal.Raise is it expects an exception, 
whereas ErrorLog.Log excepts a type of Elmah.Error.  If you wanted to create an 
elmah entry using an Elmah.Error type how would you do this (and send email) 
without throwing an exception?  Or can an exception be easily created using all 
elmah.error properties?

Original comment by Krit...@gmail.com on 21 Jan 2015 at 4:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant