Fixed showing exceptions thrown in functions