• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: overriding ALL exceptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: overriding ALL exceptions


  • Subject: Re: overriding ALL exceptions
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 03 Nov 2004 18:10:20 -0800

Exceptions not caught elsewhere can be caught in the handleException method
in Application.  Some, OutOfMemory, can't always be caught.  The frameworks
also catch and eat (naughty frameworks!) exceptions in a few places.


Chuck


At 08:25 PM 03/11/2004 -0500, Darich Runyan/OMNI INFOSEC LTD HQ wrote:
>Hello,
>
>I am still pretty new to WO so I do not know of or if there is a way
>specifically in WO to do this; however, within Java you can redirect stdout
>and stderr to pretty much anywhere you like.  Check out System.setOut and
>System.setErr.
>
>Darich
>
>> From: Nathan Dumar <email@hidden>
>> Date: Wed, 3 Nov 2004 19:50:18 -0500
>> To: WebObjects List <email@hidden>
>> Subject: overriding ALL exceptions
>>
>> Now that I'm getting to this part of my app, I'm finding that I don't
>> understand it quite as well as I had thought.
>>
>> I would like to override *all* exceptions so that any time an exception
>> goes to System.out, it will be emailed to me.  Is this the override for
>> that?  Does it go in Application.java?
>>
>> Sorry -- I know these are very basic questions ... I'm still pretty new
>> at this.
>>
>> Thank you,
>>
>> Nathan
>>
>>
>> On Oct 26, 2004, at 7:41 PM, Zak Burke wrote:
>>
>>> To slurp an Exception's stacktrace into a String, do this:
>>>
>>> import java.io.StringWriter;
>>> import java.io.PrintWriter;
>>> ...
>>> Exception e = new Exception("bad things");
>>> StringWriter sw = new StringWriter();
>>> e.printStackTrace(new PrintWriter(sw));
>>> String stackTrace = sw.toString();
>>>
>>> zak.
>>>
>>> Nathan Dumar wrote on 10/26/04 5:36 PM:
>>>> Once again, you're right.  I was sending mail to myself (which will
>>>> eventually include the stack trace, when I figure out how to do
>>>> that).  My ISP was blocking the incoming mail, not
>>
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
.co>
>m
>>
>> This email sent to email@hidden
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Webobjects-dev mailing list      (email@hidden)
>Help/Unsubscribe/Update your Subscription:
e.net
>
>This email sent to email@hidden
>

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: overriding ALL exceptions
      • From: Nathan Dumar <email@hidden>
References: 
 >overriding ALL exceptions (From: Nathan Dumar <email@hidden>)
 >Re: overriding ALL exceptions (From: Darich Runyan/OMNI INFOSEC LTD HQ <email@hidden>)

  • Prev by Date: Re: overriding ALL exceptions
  • Next by Date: Re: WebObjects and VPN
  • Previous by thread: Re: overriding ALL exceptions
  • Next by thread: Re: overriding ALL exceptions
  • Index(es):
    • Date
    • Thread