mhjort / trombi

Load testing library for testing stateful apps with Clojure
Eclipse Public License 1.0
235 stars 19 forks source link

Catch also AssertionErrors and mark those requests as KOs #81

Closed mhjort closed 2 years ago

mhjort commented 2 years ago

Currently clj-gatling error handler catches only errors deriving from Exception. Other errors will not be catched and those will be handled using https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.UncaughtExceptionHandler.html. If uncaught exception handler is not set (the default behaviour) the exception stack trace is written to stderr. At the moment clj-gatling does not set this handler and uses the default behaviour.

Clojure asserts use AssertionError which does not derive from Exception. Therefore assertion errors do not end to any reports. Those should be catched by clj-gatling and handled in the same manner as other exceptions.