tjpalmer / ion

Self-hosted ion compiler. Based on ion here: https://github.com/pervognsen/bitwise
Other
16 stars 0 forks source link

Error handling #1

Open tjpalmer opened 6 years ago

tjpalmer commented 6 years ago

Automated error handling would be great, for example:

func create_context(): !SDL_Context {
    window := SDL_CreateWindow(...);
    if (!window) {
        throw NO_WINDOW;
    }
    context := SDL_GL_CreateContext(window);
    if (!context) {
        throw NO_CONTEXT;
    }
    ...
}