This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 62792 - Error message should be more informative when connection fails
Summary: Error message should be more informative when connection fails
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 16:43 UTC by Petr Jiricka
Modified: 2005-11-21 11:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2005-08-22 16:43:46 UTC
Error messages in case of failure to connect to a database are not very
informative. For example:

1. Use the Derby driver
2. Create a connection to URL jdbc:derby:localhost/xyz using this driver
3. Connect
4. The error message is "Unable to add connection, null".

It looks like there was an exception - the stack trace of this exception should
be displayed to the user and logged to the IDE log file.
Comment 1 Andrei Badea 2005-08-22 20:32:46 UTC
Another idea would be to just improve the message.

I think there are two kinds of exceptions: expected and unexpected. Expected
exceptions should be wrapped into some user-friendly message ("Unable to add
connection. The error returned by the database was: ..."). Is is unexpected
exceptions (or those that should usually not occur) that should be logged to the
message log and displayed to the user using ErrorMessage.notify().

The exception reported in this issue is an expected one (connecting to a
database can fail for any reason). We should of course display something more
meaningful instead of "null".
Comment 2 Andrei Badea 2005-10-17 17:58:54 UTC
Fixed by the fix for issue 63957.
Comment 3 Martin Schovanek 2005-11-21 11:17:35 UTC
VERIFIED