Compiler: Catch correct exception. (#1074)