Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: email from catch or exception Date: Wed, 11 Dec 2013 23:34:42 -0500 Organization: A noiseless patient Spider Lines: 33 Message-ID: References: <625312cc-d71d-4a95-9b97-095fffe36599@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 12 Dec 2013 04:34:43 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="9208"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19U3341FOzPb2GQKxRdyY4N" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: Cancel-Lock: sha1:ekakgCL+QtEEbAv2XduaTSL7G4Y= Xref: csiph.com comp.lang.java.programmer:26854 On 12/11/2013 9:09 PM, Eric Sosman wrote: > On 12/11/2013 6:23 PM, RVic wrote: >> On Wednesday, December 11, 2013 5:55:34 PM UTC-5, RVic wrote: >>> Is anyone aware of a public domain package that can email you on an >>> error, include the stack trace or log, whenever an exception occurs? >>> Thank you, RVic >> >> Looking to send an email on exceptions that are caught, and a general >> one for those that are uncaught. >> >> I dont mind if there are a ton of emails! > > I honestly do not know how many exceptions are thrown each > second in a "typical" Java program. [...] ... but I found a twelve-year-old paper about optimizing both the exceptional and unexceptional execution paths ("A Study of Exception Handling and Its Dynamic Optimization in Java," by Ogasawara, Komatsu, and Nakatani). It contains a table counting how many exceptions are thrown by various programs. Some excerpts: - Web browser opening one (2001-vintage) page: 2,892 exceptions - MP3 player starting and loading one file: 8,205 exceptions - Parse one XML file (size? complexity?): 17,640 exceptions - One program in SPECjvm98 (now obsolete): 242,318 exceptions Now: Speaking slowly, distinctly, and directly into the carnation in my buttonhole, explain once again that you "dont mind if there are a ton of emails." -- Eric Sosman esosman@comcast-dot-net.invalid