instead of stubbing build, can you raise these exceptions in an attribute block on the factory?