     object[ method_name ] = build_mocked_method(method_name)
 
 _throw_args_usage = ->
-  throw "you need to supply at least one argument to args(), e.g. my_mock.expects('my_method').args(42)"
+  throw new Error( "you need to supply at least one argument to args(), e.g. my_mock.expects('my_method').args(42)" )
 
 _throw_args_used_more_than_once = ->
-  throw new Error("you specified args() more than once, e.g. my_mock.expects('my_method').args(1).args(2); use it once per expectation")
+  throw new Error( "you specified args() more than once, e.g. my_mock.expects('my_method').args(1).args(2); use it once per expectation" )
 
 _throw_returns_usage = ->
-  throw "you need to supply an argument to returns(), e.g. my_mock.expects('my_method').returns(123)"
+  throw new Error( "you need to supply an argument to returns(), e.g. my_mock.expects('my_method').returns(123)" )
 
 _throw_returns_used_more_than_once = ->
-  throw new Error("you specified returns() more than once, e.g. my_mock.expects('my_method').returns(1).returns(2); use it once per expectation")
+  throw new Error( "you specified returns() more than once, e.g. my_mock.expects('my_method').returns(1).returns(2); use it once per expectation" )
 
 _throw_throws_usage = ->
-  throw "you need to supply an argument to throws(), e.g. my_mock.expects('my_method').throws('an error')"
+  throw new Error( "you need to supply an argument to throws(), e.g. my_mock.expects('my_method').throws('an error')" )
 
 _throw_throws_used_more_than_once = ->
-  throw new Error("you specified throws() more than once, e.g. my_mock.expects('my_method').throws('something').throws('something else'); use it once per expectation")
+  throw new Error( "you specified throws() more than once, e.g. my_mock.expects('my_method').throws('something').throws('something else'); use it once per expectation" )
 
 _throw_returns_and_throws_both_used = ->
-  throw new Error("you specified both returns() and throws() on the same expectation; use one or the other on an expectation")
+  throw new Error( "you specified both returns() and throws() on the same expectation; use one or the other on an expectation" )

        throw_duplicate_expectation("#{all_expectations[outer].method_name}(#{all_expectations[outer]._args})")

throw_unknown_expectation = (expectation) ->
  throw "#{expectation} does not match any expectations"

throw_duplicate_expectation = (expectation) ->
  throw "#{expectation} is a duplicate expectation"


#


verify_all_expectations = ->
  errors = build_errors()
  throw new Error( errors ) unless errors == ""

build_errors = ->
  (build_not_called_error(expectation) for expectation in all_expectations when not expectation.called).join("")
