When something fails¶
You may want to create a breakpoint when an error occurs.
In Python, you can use a try
statement to catch exceptions and create a breakpoint:
1 2 3 4 5 6 7 8 |
|
In R, you can take a similar approach and use tryCatch()
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
In R, you can also define a global error handler (e.g., browser
or recover
):
19 20 21 |
|