Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1a38a09d
Commit
1a38a09d
authored
Sep 11, 2007
by
mnislaih
Browse files
Documentation for -fbreak-on-error
parent
0c45d824
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/users_guide/flags.xml
View file @
1a38a09d
...
...
@@ -502,6 +502,18 @@
<entry>
static
</entry>
<entry>
-
</entry>
</row>
<row>
<entry><option>
-fbreak-on-exception
</option></entry>
<entry><link
linkend=
"ghci-debugger-exceptions"
>
Break on any exception thrown
</link></entry>
<entry>
dynamic
</entry>
<entry><option>
-fno-break-on-exception
</option></entry>
</row>
<row>
<entry><option>
-fbreak-on-error
</option></entry>
<entry><link
linkend=
"ghci-debugger-exceptions"
>
Break on uncaught exceptions and errors
</link></entry>
<entry>
dynamic
</entry>
<entry><option>
-fno-break-on-error
</option></entry>
</row>
<row>
<entry><option>
-fno-print-bind-result
</option></entry>
<entry><link
linkend=
"ghci-stmts"
>
Turn off printing of binding results in GHCi
</link></entry>
...
...
docs/users_guide/ghci.xml
View file @
1a38a09d
...
...
@@ -1335,9 +1335,13 @@ a :: a
<literal>
:trace
</literal>
and
<literal>
:history
</literal>
to establish
the context. However,
<literal>
head
</literal>
is in a library and
we can't set a breakpoint on it directly. For this reason, GHCi
provides the flag
<literal>
-fbreak-on-exception
</literal>
which causes
the evaluator to stop when an exception is thrown, just as it does when
a breakpoint is hit. This is only really useful in conjunction with
provides the flags
<literal>
-fbreak-on-exception
</literal>
which causes
the evaluator to stop when an exception is thrown, and
<literal>
-fbreak-on-error
</literal>
, which works similarly but stops only on
uncaught exceptions. When stopping at an exception, GHCi will act
just as it does when a breakpoint is hit, with the deviation that it
will not show you any source code location. Due to this, these
commands are only really useful in conjunction with
<literal>
:trace
</literal>
, in order to log the steps leading up to the
exception. For example:
</para>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment