Skip to content

Static library to facilitate exception handling in C

Notifications You must be signed in to change notification settings

AvirukBasak/libexception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libexception

Static library to facilitate exception handling in C.

Demo

#include "exception.h"

void foo() {
    throw("ERRCODE_%d", 5);
}

int main() {
    try {
        try {
            foo();
        } catch (ex) {
            throw("THROW_%s", ex);
        }
    } catch (ex) {
        printf("%s\n", ex);
    }
}

Caught exceptions are messages by the throw macro.

About

Static library to facilitate exception handling in C

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published