The RaiseError attribute can be used to force errors to raise exceptions rather than simply return error codes in the normal way.