Implement error handling primitives