code: public void displayError(int iErrorCode)
      {
          if (iErrorCode < -2)
          {   // Error codes < -2 are usually user defined (and available at 'LastError')
              Task task = this.getTask();//getAppletScreen().getScreenFieldView().getControl();
              if (task != null)
              {
                  String strError = task.getLastError(iErrorCode);
                  if ((strError != null) && (strError.length() > 0))
                  {
                      this.displayError(strError);
                      return;
                  }
              }
          }
          DBException e = new DBException(iErrorCode);
          this.displayError(e);
      }
docs: Display a dialog/status box with this error.
  @param iErrorCode The error code.