3
$\begingroup$

When using Mathematica on the terminal (as REPL or as script) the errors are formatted in this way:

                                                                                    -12                              Numerator
Some::message: Long error message that contains a number with an exponent such as 10     or, even worse, fractions -------------
                                                                                                                    Denominator

On the terminal, which by default wraps lines, this is rendered horribly:

                        -12                              Num
erator
Some::message: Long error message that contains a number wit
h an exponent such as 10     or, even worse, fractions -----
--------
                                                        Deno
minator

Is there a global option to make sure that errors are, by default, formatted in InputForm, so that the results are readable and also copy-pasteable?

$\endgroup$

1 Answer 1

7
$\begingroup$

Use $MessagePrePrint.

$MessagePrePrint = InputForm;

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.