Problem with exception handling



  • Hi,
    I have the code as such:

    .h file:
    @
    class UCSExceptions
    {

    private:
    QString message;
    Long errorCode;
    public:
    UCSExceptions(QString message, Long errorCode);
    int UCSErrorCode;
    QString UCSErrorMessage;

    QString getMessage();
    long getErrorCode();
    

    };

    @

    .cpp file:
    @
    //snippet of code
    catch (pnm::ucsapi::SessionException &SesEx) {
    cout << "SessionExceptionError" << endl;
    cout << SesEx.errorCode << endl;
    cout << SesEx.message << endl;
    UCSExceptions UCSError(SesEx.message,SesEx.errorCode);
    throw(UCSError);
    @

    I'm getting the error "undefined reference to UCSExceptions::UCSExceptions...
    Does anyone know why?

    Thank you


  • Lifetime Qt Champion

    Hi,

    UCSExceptions(QString message, Long errorCode) not implemented ?

    Without the complete error message it's hard to help you


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.