Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(481)

Issue 261710043: Do not swallow inner startup exceptions (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 5 months ago by ondrejnovak
Modified:
8 years, 5 months ago
Reviewers:
JohnL, brett.michael.johnson, pjo, Brett
CC:
connector-cr_google.com
Visibility:
Public.

Description

Do not swallow inner startup exceptions

Patch Set 1 #

Patch Set 2 : toString version #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M src/com/google/enterprise/adaptor/Application.java View 1 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 9
ondrejnovak
8 years, 5 months ago (2015-10-08 09:15:17 UTC) #1
JohnL
+Brett
8 years, 5 months ago (2015-10-08 18:28:08 UTC) #2
Brett
Why did you find this necessary? This code already uses a log-and-throw anti-pattern to force ...
8 years, 5 months ago (2015-10-08 19:32:30 UTC) #3
ondrejnovak
On 2015/10/08 19:32:30, Brett wrote: > Why did you find this necessary? This code already ...
8 years, 5 months ago (2015-10-09 09:49:15 UTC) #4
Brett
LGTM with e.toString(). That turned out to be less than useful in this particular instance ...
8 years, 5 months ago (2015-10-10 00:32:13 UTC) #5
JohnL
Also, please edit the commit message a bit to be more specific about the change. ...
8 years, 5 months ago (2015-10-10 01:13:23 UTC) #6
ondrejnovak
Change the commit message to below. However I do not have access to the library ...
8 years, 5 months ago (2015-10-12 10:51:22 UTC) #7
pjo
github user ondrejnovak now has write access to googlegsa/library Thank you, PJ On 2015/10/12 10:51:22, ...
8 years, 5 months ago (2015-10-12 17:56:54 UTC) #8
ondrejnovak
8 years, 5 months ago (2015-10-13 08:43:49 UTC) #9
Thanks, pushed as
https://github.com/googlegsa/library/commit/0ec3148b1c9cf1ed5ae52573004eec988...

On Mon, Oct 12, 2015 at 7:56 PM, <pjo@google.com> wrote:

>
> github user ondrejnovak now has write
> access to googlegsa/library
>
> Thank you,
> PJ
>
>
>
> On 2015/10/12 10:51:22, ondrejnovak wrote:
>
>> Change the commit message to below. However I do not have access to
>>
> the
>
>> library repository. Can you grant it to me? Thanks
>>
>
> Print inner startup exception cause to stderr
>>
>
>      Startup exceptions should have the cause printed to the stderr.
>> Currently the full stack trace is printed to the log file, and only
>>
> startup
>
>> exception to the stderr - looking like this
>>
>
>        Exception in thread "main"
>> com.google.enterprise.adaptor.StartupException: Failed to start
>>
> application.
>
>>          at
>> com.google.enterprise.adaptor.Application.main(Application.java:555)
>>          at
>>
>
> com.google.enterprise.adaptor.AbstractAdaptor.main(AbstractAdaptor.java:61)
>
>>          at
>>
>
>
>
com.google.enterprise.adaptor.database.DatabaseAdaptor.main(DatabaseAdaptor.java:271)
>
>      Especially when there are some other warnings printed out to
>> stdout/stderr, this can be confusing, so including also the inner
>>
> exception
>
>> in the message
>>
>
>
>
> On Sat, Oct 10, 2015 at 3:13 AM, <mailto:jlacey@google.com> wrote:
>>
>
> > Also, please edit the commit message a bit to be more specific about
>>
> the
>
>> > change. The root cause exception is not swallowed, but logged. It
>>
> simply
>
>> > wasn't passed to the StartupException that terminated the thread
>>
> (which
>
>> > is what the JVM printed on the console).
>> >
>> > https://codereview.appspot.com/261710043/
>> >
>>
>
>
> https://codereview.appspot.com/261710043/
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b