log exception to stdout and sentry
raise the exception when running the testsuite