Distinguish between synchronous and asynchronous exceptions