company logo

Application errors

Application errors are errors caused by the user running the application. Application errors can be solved by the user, only, and should be reported to the user. Typical application errors are:

  • 0064 - duplicate key value in current index
  • 0066 - duplicate key value
  • 0005 - invalid database location defined
  • 0037 - database could not be opened
  • 0231 - invalid dictionary (schema version to old)
  • 0162 - maximum number of instances exceeded

The way the user has to react on application errors depends on the the error. The error description contains necessary hints for the user. For informing the user, Application ::output() should be called, which creates a message on the console or in the application's output area in case of a GUI application.

// reporting database error

  catch ( odaba::Exception &e ) {

    String     message;

    message.append("Error raised ");

    message.append(e.errorReason());

    message.append('\n');

    message.append(e.errorDescription());

    message.append('\n');

    Application::output(message,false,true);

  }