Exception implementation for C