Giter VIP home page Giter VIP logo

c-panic's Introduction

c-panic

Lightweight C module implementing panic, panic_errno, todo and unimplemented macros. The module uses fprintf and exit functions as well as stderr stream and EXIT_FAILURE macro. It also uses strerror from string.h to convert errno to string in case of panic_errno macro.

The difference between todo and unimplemented is that while todo conveys an intent of implementing the functionality later, unimplemented makes no such claims.

Usage

Simply copy the panic.h file into your project.

Examples

panic

panic("unexpected error %d", 10);
test_panic.c:5: panic: unexpected error 10

panic_errno

panic_errno("panic_errno prefix %d", 10);
panic_errno.c:7: panic: panic_errno prefix 10: Success

todo

todo("%s", "it will be implemented later");
test_todo.c:5: todo: it will be implemented later

unimplemented

unimplemented("wll %s be %s", "never", "implemented");
test_unimplemented.c:5: unimplemented: wll never be implemented

c-panic's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.