Ticket #175 (closed defect: fixed)

Opened 21 months ago

Last modified 21 months ago

Wrappers do not raise system errors

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

Description (last modified by michelpons) (diff)

C++ code can raise a cape_open_error, which is is translated by interface adapters to returning a CAPE-OPEN error code and storing the internal error.

Here the generated error code is always COBIAErr_CAPEOPEN_error despite system error codes being used to construct the cape_open_error.

Applies to code generator and client header files (which are code generated).

Change History

comment:1 Changed 21 months ago by jasper

  • Description modified (diff)

Current error handling code in adapters reads

			} catch (cape_open_error &ex) {
				static_cast<BaseClass*>(static_cast<ClassName*>(me))->setErrorFromCapeOpenError(COBIATEXT("ICapeArrayBooleanParameter::Value"),ex);
				resultCode=COBIAERR_CAPEOPENError;
			} catch (std::exception &ex) {
				COBIA_ASSERT(false,"unhandled std::exception");
				cape_open_error ex1(ex);
				static_cast<BaseClass*>(static_cast<ClassName*>(me))->setErrorFromCapeOpenError(COBIATEXT("ICapeArrayBooleanParameter::Value"),ex1);
				resultCode=COBIAERR_CAPEOPENError;
			} catch (...) {
				resultCode=COBIAERR_UnknownError;
				COBIA_ASSERT(false,"unhandled unknown exception");
			}

catching the cape_open error should return the error code associated with the cape_open_error.

comment:2 Changed 21 months ago by jasper

The wrappers were fixed already in #149, this fix fixes the code generation interface adapters (which themselves are not generated), and applies the fixed code generation to the client header files (which was not done as part of #149 it seems, for the main branch; for the phaseIII branch it was).

Last edited 21 months ago by michelpons (previous) (diff)

comment:3 Changed 21 months ago by jasper

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

comment:5 Changed 21 months ago by michelpons

  • Description modified (diff)
Note: See TracTickets for help on using tickets.