exercise 2.6. also fixed a bug where 'catch' was not creating a 'throw' function in the necessary scope.