Timeline for How to check which statement has thrown exception?
Current License: CC BY-SA 3.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 2, 2017 at 8:02 | answer | added | vaultah | timeline score: 1 | |
| Feb 2, 2017 at 7:47 | answer | added | Joe | timeline score: 0 | |
| Feb 2, 2017 at 7:42 | answer | added | Klaus D. | timeline score: 0 | |
| Feb 2, 2017 at 7:37 | comment | added | PM 2Ring |
@KlausD. Fair comment, but perhaps Logesh wishes to continue execution after any AssertionErrors in that block are raised; of course, that's generally not a safe strategy, but it's sometimes useful, as in my demo.
|
|
| Feb 2, 2017 at 7:30 | comment | added | Klaus D. |
The most simple solution is to remove the try / expect.
|
|
| Feb 2, 2017 at 7:19 | answer | added | PM 2Ring | timeline score: 1 | |
| Feb 2, 2017 at 7:10 | comment | added | BrenBarn |
If you want to distinguish between the two, use separate try/except blocks for each statement.
|
|
| Feb 2, 2017 at 7:10 | history | asked | Logesh | CC BY-SA 3.0 |