Log throws correct exception type