CPP 1.1 NO IDEA Avatar
  1. OMG Issue

CPP11 — Extraction operator for system exceptions?

  • Key: CPP11-119
  • Legacy Issue Number: 3103
  • Status: closed  
  • Source: Triodia Technologies Pty Ltd ( Michi Henning)
  • Summary:

    currently it is not possible to pull an exception out of an Any generically,
    that is, I cannot write:

    const CORBA::SystemException * sep;
    CORBA::Any a;

    // assume a contains a system exception...

    a >>= sep;

    Normally, I won't need this. However, it's come up as part of portable
    interceptors. For example, I might want to write an interceptor that
    logs things, including system exceptions. Now, if I have a system exception
    in an Any, the only way to get it out is to successively try to extract
    every possible system exception until I find one that works.

    That's rather tedious. It would be nicer if I could extract a base
    pointer to the actual exception, so I can print the minor number and
    completion status.

    I would like to suggest adding the following extraction operator:

    Boolean operator>>=(const SystemException * &);

  • Reported: CPP 1.0 — Fri, 10 Dec 1999 05:00 GMT
  • Disposition: Resolved — CPP 1.1
  • Disposition Summary:

    closed/resolved

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