cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
41
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: Ryan Hilfers on 29-04-2013 12:36:11 PM
Hi all,
Is there a way to capture exceptions/errors in the error log with a custom element?  I know  SessionAPI.addToLog() gets me into the ActivityLog and System.out will get me into Tomcat stdOut file. I'm assuming i need to throw an exception of some type in order to get the Error logger to pick up the event. Does anyone know how to do this?  I like how the canned elements keep Activity log simple and dump the whole stack trace in the error log when there's a problem.
 
Thanks,
Ryan

Subject: RE: Output to ErrorLog
Replied by: Ryan Hilfers on 29-04-2013 01:20:36 PM
Paul Tindall:
throw new ElementException("Whatever exception message you want to throw");

 
Awesome, easy as that. Looks like I can include a throwable as well. Thanks Paul. 

Subject: RE: Output to ErrorLog
Replied by: Paul Tindall on 29-04-2013 12:46:19 PM
throw new ElementException("Whatever exception message you want to throw");
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links