I’ve just started playing with ELMAH.
was wondering, is there a way to pass info, eg a variable value, or some other text when an exception is thrown?.
Currently Im using this:
ErrorSignal.FromCurrentContext().Raise(e);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The variable depends on the context of the exception? Or is it global (Session value?)
If it’s depending on context, you can just try catch and redirect an exception with a custom message manually to Elmah.
edit: snippet
… .Raise(new Exception(“Your custom message with variable value”));