use different raise syntax to support 1.8.7