asp.net - Elmah error logging, can I just log a message? -


i installed elmah (https://code.google.com/p/elmah/) asp.net application. possible log message without creating exception first?

catch(exception e) {     exception ex = new exception("id = 1", e);     errorsignal.fromcurrentcontext().raise(ex); } 

so possible do:

errorsignal.fromcurrentcontext().log("hello testing elmah"); 

yes, can use errorsignal without throwing exception.

errorsignal.fromcurrentcontext().raise(new notsupportedexception()); 

for custom message, can create custom exception.

var customex = new exception("hello testing elmah", new notsupportedexception());  errorsignal.fromcurrentcontext().raise(customex); 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -