Catch unexpected exceptions thrown by all compiler phases and turn them into reasonable InternalCompilerErrors

Description

Currently the compiler only catches unexpected exceptions in visitor passes. It should process exceptions from all passes and turn them into InternalCompilerErrors. In particular, the code generation passes need to be protected by this.

Environment

None

Status

Assignee

Unassigned

Reporter

Igor Peshansky

Labels

None

Components

Fix versions

Affects versions

Priority

Medium
Configure