Ticket #149 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Change error handling for non-CAPE-OPEN errors on interface adapters

Reported by: jasper Owned by: jasper
Priority: minor Milestone: Maintenance of Phase II
Component: Code generation Version: 1.2.0.11
Keywords: Cc:

Description

Interface adapters currently forward non-CAPE-OPEN errors (e.g. COBIAERR_NullPointer, COBIAERR_InvalidArgument) as CAPE-OPEN error with scope, interface name, etc and default error text for the non-CAPE-OPEN error.

Error messages become shorter and cleaner if non-CAPE-OPEN errors are simply forwarded as non-CAPE-OPEN errors.

Change History

comment:1 Changed 2 years ago by jasper

As implementations have the interface wrapper code embedded in the binaries, a recompilation against new client headers is needed to benefit from the shorter error messages.

comment:2 Changed 2 years ago by jasper

  • Status changed from new to closed
  • Resolution set to fixed

comment:3 Changed 2 years ago by michelpons

Am I right to understand that an advisory should be delivered with distribution of COBIA 1.2.0.11? All developers of COBIA-based applications must re-compile and re-build their applications, make a new distribution, in order to take advantage of this change.
What does it mean "cleaner" error messages? "Shorter" I understand easily as less characters.

comment:4 Changed 2 years ago by jasper

In the previous implementation, COBIA Error COBIAErr_NullPointer for example would be translated into a a COBIAErr_CAPEOPENError, with full scope and the message equal to the system message of COBIAErr_NullPointer. Formatting this error yields "in [method] of [interface]: Null pointer". The error code of the returned error did not allow the caller to immediately determine the error is a null pointer error (other than by comparing the message to the system text for the same error).

Now the error is simply raised as COBIAErr_NullPointer - which allows the caller to figure out what the error is. On formatting, the message would just read "Null pointer" (without scope).

Note: See TracTickets for help on using tickets.