Ticket #175 (new defect) — at Version 1

Opened 20 months ago

Last modified 20 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 jasper) (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 20 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.

Note: See TracTickets for help on using tickets.