Using email addresses in exception messages

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Using email addresses in exception messages

sebb-2-2
Some of our code has Exception messages such as the following:

>> (Collections:LRUMap)
throw new IllegalStateException("Entry.before is null." +
" Please check that your keys are immutable, and that you have used
synchronization properly." +
" If so, then please report this to [hidden email] as a bug.");
<<

I guess it seemed like a good idea at the time, but I think the idea
has backfired:

https://lists.apache.org/thread.html/3363e23218b4c1c21b8093321ac293d68d2e4ab35b982adb53b1d5d6@%3Cdev.commons.apache.org%3E

I have seen about 30 of these mails altogether so far.

The intention was for the developer to capture the exception, check
for the possible programming errors and then inform Commons developers
if they believe there is a bug.

However it looks like the developers in the case have shown the error
message direct to end users.

I think the messages (there are quite a lot in Collections, possibly
elsewhere) should not include an email address. Instead maybe say
something like:

>>
throw new IllegalStateException("Entry.before is null." +
" This should not occur if your keys are immutable, and you have used
synchronization properly." +
>>

This would leave it up to the developers to work out how contact us
once they have eliminated any programming errors. Whilst this is a bit
more work for the developers, I don't think it's unreasonable to
expect developers to know how to report bugs in code they are using.

WDYT?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Using email addresses in exception messages

Rob Tompkins


> On May 12, 2019, at 6:45 AM, sebb <[hidden email]> wrote:
>
> Some of our code has Exception messages such as the following:
>
>>> (Collections:LRUMap)
> throw new IllegalStateException("Entry.before is null." +
> " Please check that your keys are immutable, and that you have used
> synchronization properly." +
> " If so, then please report this to [hidden email] as a bug.");
> <<
>
> I guess it seemed like a good idea at the time, but I think the idea
> has backfired:
>
> https://lists.apache.org/thread.html/3363e23218b4c1c21b8093321ac293d68d2e4ab35b982adb53b1d5d6@%3Cdev.commons.apache.org%3E
>
> I have seen about 30 of these mails altogether so far.
>
> The intention was for the developer to capture the exception, check
> for the possible programming errors and then inform Commons developers
> if they believe there is a bug.
>
> However it looks like the developers in the case have shown the error
> message direct to end users.
>
> I think the messages (there are quite a lot in Collections, possibly
> elsewhere) should not include an email address. Instead maybe say
> something like:
>
>>>
> throw new IllegalStateException("Entry.before is null." +
> " This should not occur if your keys are immutable, and you have used
> synchronization properly." +
>>>
>
> This would leave it up to the developers to work out how contact us
> once they have eliminated any programming errors. Whilst this is a bit
> more work for the developers, I don't think it's unreasonable to
> expect developers to know how to report bugs in code they are using.
>
> WDYT?

I would think that contact information in an error seems to be strange. I would prefer why the error happened as you suggested.

Hopefully users of our libraries understand how to get in contact with us. But, given my experience at $work, that’s not always the case.

-Rob

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Using email addresses in exception messages

garydgregory
In reply to this post by sebb-2-2
+1 to removing email addresses from exception messages. We should do a pass
over all of Commons.

Gary

On Sun, May 12, 2019, 06:46 sebb <[hidden email]> wrote:

> Some of our code has Exception messages such as the following:
>
> >> (Collections:LRUMap)
> throw new IllegalStateException("Entry.before is null." +
> " Please check that your keys are immutable, and that you have used
> synchronization properly." +
> " If so, then please report this to [hidden email] as a bug.");
> <<
>
> I guess it seemed like a good idea at the time, but I think the idea
> has backfired:
>
>
> https://lists.apache.org/thread.html/3363e23218b4c1c21b8093321ac293d68d2e4ab35b982adb53b1d5d6@%3Cdev.commons.apache.org%3E
>
> I have seen about 30 of these mails altogether so far.
>
> The intention was for the developer to capture the exception, check
> for the possible programming errors and then inform Commons developers
> if they believe there is a bug.
>
> However it looks like the developers in the case have shown the error
> message direct to end users.
>
> I think the messages (there are quite a lot in Collections, possibly
> elsewhere) should not include an email address. Instead maybe say
> something like:
>
> >>
> throw new IllegalStateException("Entry.before is null." +
> " This should not occur if your keys are immutable, and you have used
> synchronization properly." +
> >>
>
> This would leave it up to the developers to work out how contact us
> once they have eliminated any programming errors. Whilst this is a bit
> more work for the developers, I don't think it's unreasonable to
> expect developers to know how to report bugs in code they are using.
>
> WDYT?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Using email addresses in exception messages

Emmanuel Bourg-3
Le 12/05/2019 à 14:25, Gary Gregory a écrit :
> +1 to removing email addresses from exception messages. We should do a pass
> over all of Commons.

+1, makes sense.

Emmanuel Bourg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Using email addresses in exception messages

Bill Igoe
In a prop shop long ago , I also emailed all exception messages. It is a
great way to correct logic errors and capture  potentially sloppy code.
Graphing the errors resulted in an exponential decline in errors.

I also developed a handy performance tracker for critical algorithms and
saved those results to a log file.

Helps a ton.

Cheers to all




On Sun, May 12, 2019 at 3:22 PM Emmanuel Bourg <[hidden email]> wrote:

> Le 12/05/2019 à 14:25, Gary Gregory a écrit :
> > +1 to removing email addresses from exception messages. We should do a
> pass
> > over all of Commons.
>
> +1, makes sense.
>
> Emmanuel Bourg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Using email addresses in exception messages

garydgregory
You could do that with Log4j today ;-)

Gary

On Mon, May 13, 2019, 13:42 Bill Igoe <[hidden email]> wrote:

> In a prop shop long ago , I also emailed all exception messages. It is a
> great way to correct logic errors and capture  potentially sloppy code.
> Graphing the errors resulted in an exponential decline in errors.
>
> I also developed a handy performance tracker for critical algorithms and
> saved those results to a log file.
>
> Helps a ton.
>
> Cheers to all
>
>
>
>
> On Sun, May 12, 2019 at 3:22 PM Emmanuel Bourg <[hidden email]> wrote:
>
> > Le 12/05/2019 à 14:25, Gary Gregory a écrit :
> > > +1 to removing email addresses from exception messages. We should do a
> > pass
> > > over all of Commons.
> >
> > +1, makes sense.
> >
> > Emmanuel Bourg
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Using email addresses in exception messages

sebb-2-2
In reply to this post by Bill Igoe
On Mon, 13 May 2019 at 18:42, Bill Igoe <[hidden email]> wrote:
>
> In a prop shop long ago , I also emailed all exception messages. It is a
> great way to correct logic errors and capture  potentially sloppy code.
> Graphing the errors resulted in an exponential decline in errors.
>
> I also developed a handy performance tracker for critical algorithms and
> saved those results to a log file.
>
> Helps a ton.

A 'ton' is the appropriate word - there have been over 100 emails to
the dev@commons list complaining about the same problem.
(They have not been moderated through as it would not help)

It's only appropriate to email errors if they are sent to the people
who can do something about the problem.
In this case, that is the website developers who are using Collections
incorrectly.
Furthermore, they have exposed the Exception message to end users,
which means we get the emails direct from end users.

> Cheers to all
>
>
>
>
> On Sun, May 12, 2019 at 3:22 PM Emmanuel Bourg <[hidden email]> wrote:
>
> > Le 12/05/2019 à 14:25, Gary Gregory a écrit :
> > > +1 to removing email addresses from exception messages. We should do a
> > pass
> > > over all of Commons.
> >
> > +1, makes sense.
> >
> > Emmanuel Bourg
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]