Fix chaining of Java exceptions (set the cause)

Description

In all of the cases where we catch an exception, then throw a new one, we should
use the chaining mechanism (initCause()) in JDK 1.4 to avoid losing information.
For example, in UCharacter.java the following

catch (Exception e)
{
throw new RuntimeException(e.getMessage());
}

should be changed to:

catch (Exception e)
{
throw (RuntimeException) new RuntimeException(
"Could not initialize UCharacterProperty").initCause();
}

Could be done after DCUT

Activity

Show:
TracBot
June 30, 2018, 11:56 PM
Trac Comment by notes—1970-01-01T01:30:51.000Z

We need JDK 1.3 compatibility for Eclipse. So this might not be worth fixing.

TracBot
June 30, 2018, 11:56 PM
Trac Comment by auditor—1970-01-01T01:30:52.000Z
  • Wed Jun 15 12:41:05 2005 weiv changed notes2: assign: "" to "ram", priority: "" to "critical",

  • Wed Jun 15 12:41:05 2005 weiv moved from incoming to config_build

  • Mon Aug 1 14:26:30 2005 schererm changed notes2: target: "UNSCH" to "3.6",

  • Fri Aug 12 09:55:30 2005 ram changed notes2: weeks: "" to "1",

  • Fri Mar 31 14:39:16 2006 ram changed notes2: priority: "critical" to "high", comments: "" to "!discuss",

  • Fri Oct 6 15:37:04 2006 ram changed notes2: target: "3.6" to "UNSCH",

  • Fri Oct 6 15:37:04 2006 ram changed notes

  • Fri Oct 13 22:22:07 2006 grhoten changed notes2: priority: "high" to "medium", comments: "!discuss" to "",

  • Fri Oct 13 22:22:07 2006 grhoten changed notes

TracBot
June 30, 2018, 11:56 PM
Trac Comment 4 by —2009-03-18T20:11:01.000Z

We'll change the minimum JDK version support after 4.2. We want to look into this again.

Assignee

Mark Davis

Reporter

TracBot

Components

Labels

None

Reviewer

None

Priority

assess

Time Needed

Days

Fix versions

None
Configure