Giter Site home page Giter Site logo

charleshe023 / nlassert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nestlabs/nlassert

0.0 0.0 0.0 838 KB

Nlassert defines macros and interfaces for performing both compile- and run-time assertion checking and run-time exception handling.

License: Apache License 2.0

Shell 0.24% C++ 0.31% C 51.27% Makefile 45.62% M4 2.56%

nlassert's Introduction

Build Status Coverage Status

Nest Labs Assert

Introduction

This package defines macros and interfaces for performing both compile- and run-time assertion checking and run-time exception handling.

Where exception-handing is concerned, the format of the macros are inspired by those found in Mac OS Classic and, later, Mac OS X. These, in turn, were inspired by "Living In an Exceptional World" by Sean Parent (develop, The Apple Technical Journal, Issue 11, August/September 1992). See:

http://www.mactech.com/articles/develop/issue_11/Parent_final.html

for the methodology behind these error handling and assertion macros.

Overview

The interfaces in this package come in two interface modalities:

  • Run-time Interfaces that dynamically check a logical assertion and alter run-time execution on assertion firing.
  • Compile-time Interfaces that statically check a logical assertion and terminate compile-time execution on assertion firing.

Run-time

The run-time modality interfaces in this package come in three families:

  • Assertion Similar to the traditional C Standard Library assert().
  • Precondition Designed to be placed at the head of an interface or method to check incoming parameters and return on assertion failure.
  • Exception Designed to jump to a local label on assertion failure to support the method of error and exception handling that advocates a single function or method return site and, by extension, consolidated points of exception and error handling as well as resource clean-up.

There are several styles of interfaces within each family and several potential variants within each style, all of which are summarized below and are described in detail in the following sections.

Compile-time

The compile-time modality interfaces in this package are simpler and come in a single family with a couple of styles and variants, all intended to provide parallelism with the run-time interfaces.

Interact

There are numerous avenues for nlassert support:

Versioning

nlassert follows the Semantic Versioning guidelines for release cycle transparency and to maintain backwards compatibility.

License

nlassert is released under the Apache License, Version 2.0 license. See the LICENSE file for more information.

nlassert's People

Contributors

gerickson 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.