Properly wrap exceptions in bamboo.module and bamboo.wire