Exemple

//------------------------------------------------------------------- // ECLErr::GetReasonCode // // Cause an 'invalid parameters' error and tryp the ECL exception. // The extract the error number and language-sensative text. //------------------------------------------------------------------- void Sample32() { ECLPS *PS = NULL; try { PS = new ECLPS('A'); PS->SetCursorPos(999,999); // Invalid parameters } catch (ECLErr ErrObj) { printf("The following ECL error was trapped:\n"); printf("%s \nError number: %lu\nReason code: %lu\n", ErrObj.GetMsgText(), ErrObj.GetMsgNumber(), ErrObj.GetReasonCode()); } if (PS != NULL) delete PS; } // end sample