Moved exception definitions outside "let" expressions to the level
of the structure