[Documentation] [TitleIndex] [WordIndex


The usual C++ means is to use exceptions, however in embedded systems, exceptions are often unavailable or are too resource-heavy. This library provides a simpler alternative, combining error flags, macros and an error handler class to provide convenient disposal of errors across multiple platforms for the ecl. It also provides simple runtime and compile time asserts and aborts.

For a general overview on how ecl handles debugging, see Debugging and Error Handling in the Ecl.

For higher level exception handling of errors, refer to ecl_exceptions.

Compiling & Linking

Include the following at the top of any translation unit:

   1 #include <ecl/errors.hpp>
   3 // The error interfaces
   4 using ecl_compile_time_assert;
   5 using ecl_run_time_assert;
   6 using ecl_run_time_abort;
   8 // Error type enumerations
   9 using ecl::NoError;
  10 using ecl::ConfigurationError;
  11 using ecl::UnknownError;
  12 //...
  14 // Error Handler
  15 using ecl::Error;

If outside ros, you will also need to link to ecl_errors.


2024-07-20 13:20