I2JAV 1.1 NO IDEA Avatar
  1. OMG Issue

I2JAV11 — Displaying SystemExceptions

  • Key: I2JAV11-27
  • Legacy Issue Number: 4057
  • Status: closed  
  • Source: hursley.ibm.com ( Simon Nash)
  • Summary:

    The definition of org.omg.CORBA.SystemException in section 1.15.2 of the
    IDL to Java mapping spec has no code to format and display system exceptions
    in string form. It would be useful to display the minor code as a hexadecimal
    number and the completion status as a string.

    The current implementation in the JDK contains a toString() method that
    displays the minor code as a decimal number and the completion status as a
    string. Displaying the minor code as a decimal number is a readability issue
    for both OMG standard minor codes and vendor-specific minor codes. For example,
    the OMG standard minor code 0x4f4d0001 would be formatted as 1330446337 and a
    vendor proprietary minor code 0xc9c25401 would be formatted as 3384955905
    (or -910011391 if using signed 32-bit arithmetic). Displaying the minor code
    in hexadecimal form solves this problem.

    Proposed resolution:

    Add the following implementation of org.omg.CORBA.SystemException.toString()
    to section 1.15.2 of the IDL to Java mapping spec and to the zip file:

    public String toString() {

    String completedString;
    String superString = super.toString();
    String minorString = " minor code: 0x" + Integer.toHexString(minor).toUpperCase();
    switch (completed.value())

    { case CompletionStatus._COMPLETED_YES: completedString = " completed: Yes"; break; case CompletionStatus._COMPLETED_NO: completedString = " completed: No"; break; case CompletionStatus._COMPLETED_MAYBE: default: completedString = " completed: Maybe"; break; }

    return superString + minorString + completedString;
    }

  • Reported: I2JAV 1.0 — Thu, 16 Nov 2000 05:00 GMT
  • Disposition: Resolved — I2JAV 1.1
  • Disposition Summary:

    Incorporate change and close issue

  • Updated: Fri, 6 Mar 2015 20:58 GMT