Display the error message that caused the exception.
497865
def display_error_message(ex)
      trace "#{name} aborted!"
      trace ex.message
      if options.backtrace
        trace ex.backtrace.join("\n")
      else
        trace Backtrace.collapse(ex.backtrace).join("\n")
      end
      trace "Tasks: #{ex.chain}" if has_chain?(ex)
      trace "(See full trace by running task with --trace)" unless
        options.backtrace
    end
892775
def error(msg, log_file=None):
        """"""
        UtilClass.print_msg(msg + os.linesep)
        if log_file is not None:
            UtilClass.writelog(log_file, msg, 'append')
        raise RuntimeError(msg)
154638
def render_error(exception)
      logger.debug "Exception raised: #{exception.class.name}: #{exception.message}" if logger
      # When a normalised class is present, make sure we
      # convert it to a useable error class.
      normalised_class = exception.class.ancestors.detect do |klass|
        klass < StandardError and error_mapping.has_key?(klass)
      end
      if normalised_class
        mapped = error_mapping[normalised_class]
        if mapped.respond_to?(:call)
          exception = mapped.call(exception)
        else
          exception = mapped.new exception.message
        end
      end
      self.status = lookup_error_status(exception)
      render_json({
        :error             => lookup_error_name(exception).to_s,
        :error_description => lookup_error_message(exception)
      }.merge(lookup_error_metadata(exception)))
    end
1288508
protected function displayCliException($e)
    {
        echo 'Exception', PHP_EOL,
        $this->highlight($e->getMessage()),
        'File', PHP_EOL,
        $this->highlight($e->getFile() . ' on line ' . $e->getLine()),
        'Trace', PHP_EOL,
        $this->highlight($e->getTraceAsString());

        if ($this->autoExit) {
            exit($this->getExitCode($e));
        }
    }
74361
def error_handler(exception_cls, response):
    """"""
    # Responses are sent as html. Split on the newlines and give us
    # the <p> text back.
    error = convert_response_to_text(response)
    exception = exception_cls("Response Code: %s\tResponse: %s" %
                              (response.status_code, error))
    exception.status_code = response.status_code
    raise exception
868738
static void showErrorMessage(Exception e, Component parent) {
    String msg = e.getMessage();
    JOptionPane.showMessageDialog(parent, msg, "Error", JOptionPane.ERROR_MESSAGE);
    e.printStackTrace();
  }
141778
public void showMessage( final ClientRuntimeError error) {
        StringBuilder result = new StringBuilder(DataSetExplorerConstants.INSTANCE.error());
        
        if (error != null) {
            final String message = error.getMessage();
            Throwable t = error.getRootCause();
            String localizedMessage = t != null ? t.getLocalizedMessage() : null;
            result = new StringBuilder(message);
            if (localizedMessage != null) {
                result.append(" ").append(DataSetExplorerConstants.INSTANCE.cause()).
                        append(": ").append(localizedMessage);
            }
        }
        
        showMessage(result.toString());
    }
760975
def raise_error(
            self,
            exception_type,  # type: Type[Exception]
            message  # type: Text
    ):
        # type: (...) -> NoReturn
        """"""
        error_message = '{} at {}'.format(message, repr(self))
        raise exception_type(error_message)
607316
@JsonIgnore
    public String getErrorMessage(){
        StringBuilder sb = new StringBuilder();
        sb.append(exceptionCode.getCode()).append(":").append(exceptionCode.getMessage());
        if(this.message != null && ! this.message.isEmpty()){
            sb.append(" - ").append(message);
        }
        return sb.toString();
    }
571156
def error(self, message: str) -> None:
        """"""
        if len(self._custom_error_message) > 0:
            message = self._custom_error_message
            self._custom_error_message = ''

        lines = message.split('\n')
        linum = 0
        formatted_message = ''
        for line in lines:
            if linum == 0:
                formatted_message = 'Error: ' + line
            else:
                formatted_message += '\n       ' + line
            linum += 1

        sys.stderr.write(Fore.LIGHTRED_EX + '{}\n\n'.format(formatted_message) + Fore.RESET)
        # sys.stderr.write('{}\n\n'.format(formatted_message))
        self.print_help()
        sys.exit(1)
443397
protected void showLightError(String msg) {
    if (getActivity() != null) {
      Toast.makeText(getActivity(), msg, Toast.LENGTH_SHORT).show();
    }
  }
518424
public void displayError(String strError, int iWarningLevel)
    {
        if ((strError == null) || (strError.length() == 0))
            return;     // No error
        Task task = this.getTask();
        if (task != null)
            task.setStatusText(strError, iWarningLevel);
    }
658108
private void printRawError(int pos, String msg) {
        if (source == null || pos == Position.NOPOS) {
            printRawLines(errWriter, "error: " + msg);
        } else {
            int line = source.getLineNumber(pos);
            JavaFileObject file = source.getFile();
            if (file != null)
                printRawLines(errWriter,
                           file.getName() + ":" +
                           line + ": " + msg);
            printErrLine(pos, errWriter);
        }
        errWriter.flush();
    }
701014
def display_error_message(ex)
      $stderr.puts "#{name} aborted!"
      $stderr.puts ex.message
      if options.trace
        $stderr.puts ex.backtrace.join("\n")
      else
        $stderr.puts ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || ""
        $stderr.puts "(See full trace by running task with --trace)"
      end
    end
501258
@JsonIgnore
    public String getErrorMessage() {
        return (params.length == 0) ? exceptionCode.getMessageTemplate() :
                String.format(exceptionCode.getMessageTemplate(), params);
    }
395853
public void exception(Throwable e) {
    final String msg = e.getMessage();
    log(Level.SEVERE, msg != null ? msg : "An exception occurred.", e);
  }
1014323
public String getErrorMessage ()
    {
        String msg = getMessage();
        return String.valueOf(_errorCode).equals(msg) ? null : msg;
    }