Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26852

Re: email from catch or exception

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: email from catch or exception
Date 2013-12-11 21:09 -0500
Organization A noiseless patient Spider
Message-ID <l8b5sf$3ta$1@dont-email.me> (permalink)
References <d330148b-653c-4327-81a4-151de67a9e06@googlegroups.com> <625312cc-d71d-4a95-9b97-095fffe36599@googlegroups.com>

Show all headers | View raw


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.  As I said in another post
I think you'd have to modify the JVM to find out -- or maybe
you could use something in java.lang.instrument, a package I've
never had occasion to unwrap.  Perhaps you should loosen that
ribbon a bit before writing "I want ALL of them!" on your
Christmas list.

     But even if it's only one per second, you'll get 86400 per
day.  Can you read 86400 E-mails in one day?  Can you find the
four "different" stack traces among those 86400?  Remember: You
have ONE second to make up your mind about each of them, if you
don't want to fall behind!  Less, if you're monitoring more than
one Java environment ...  Try this experiment: Turn off all your
spam filters, and opt out of any that your ISP offers, and tell
us how smoothly you deal with the onslaught.

     Another little matter: At a rate of >= 1 E-mail/second, many
mail servers will say "Spammer!" and refuse to cooperate.  What
are the chances that any of the "interesting" E-mails will be
among those that get through before the boom is lowered?

     If you're in a position to write `catch' blocks to separate
the "possibly interesting" from "certainly boring" exceptions,
java.util.logging.Handler has sufficient hooks to spew info to
an agent that will E-mail it.  But ALL exceptions!?  I can't think
of any way (even in principle) to do that with a stock JVM, and
I can't imagine that you'd get anything usable out of it.

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 14:55 -0800
  Re: email from catch or exception Knute Johnson <september@knutejohnson.com> - 2013-12-11 15:12 -0800
  Re: email from catch or exception Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-12-11 18:13 -0500
    Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:08 -0500
      Re: email from catch or exception Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-12-13 12:44 -0400
        Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-14 16:36 -0500
          Re: email from catch or exception Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-12-15 17:10 -0400
  Re: email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 15:23 -0800
    Re: email from catch or exception Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-12-11 21:09 -0500
      Re: email from catch or exception Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-12-11 23:34 -0500
    Re: email from catch or exception leif.roar@invalid.com (Leif Roar Moldskred) - 2013-12-12 00:41 -0600
  Re: email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 15:26 -0800
  Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:06 -0500
  Re: email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 16:28 -0800
    Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:50 -0500
      Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:52 -0500

csiph-web