Genera un'eccezione. L'eccezione viene generata dall'interfaccia del broker dei messaggi utilizzando gli argomenti specificati come dati dell'eccezione.
void cciThrowExceptionW( int* returnCode, CCI_EXCEPTION_TYPE type, const char* file, int line, const char* function, const CciChar* messageSource, int messageNumber, const CciChar* traceText, ... );
Nessuno. Se si verifica un errore, il parametro returnCode indica il motivo dell'errore.
void raiseExceptionWithBroker(CciChar* helpfulText, char* file, /* il file di origine danneggiato */ int line, /* riga nel file precedente */ char* func /* funzione nel file precedente */ ){ int rc = CCI_SUCCESS; /* Imposta il nome del catalogo dei messaggi */ const char* catalog = "BIPv600"; /* Converte il nome del catalogo in caratteri estesi (wide). * BIP_DEF_COMP_CCSID è UTF-8 su Distributed e LATIN1 su z/OS */ int maxChars = strlen(catalog)+1; CciChar* wCatalog =(CciChar*)malloc(maxChars*sizeof(CciChar)); cciMbsToUcs(&rc, catalog, wCatalog, maxChars, BIP_DEF_COMP_CCSID); /* Quanto riportato sopra potrebbe avere avuto esito negativo, ma è già in fase di generazione un'eccezione, * rc è quindi impostato ora sul tipo di esito positivo. */ rc = CCI_SUCCESS; /* Genera l'eccezione. La spiegazione verrà aggiunta come traceText e * come commento del messaggio */ cciThrowExceptionW(&rc, CCI_FATAL_EXCEPTION, file, line, func, wCatalog, BIP2111, helpfulText, helpfulText, (CciChar*)0 ); /* Quanto riportato sopra potrebbe avere avuto esito negativo, ma è già in fase di generazione un'eccezione, * il valore di rc non è quindi significativo. */ }