Skip to content

Commit

Permalink
Added ETL_ERROR_WITH_VALUE macro for exceptions that require a value
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Oct 20, 2022
1 parent 76c7c1a commit 890195f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/etl/error_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,11 @@ namespace etl
#endif

#if defined(ETL_VERBOSE_ERRORS)
#define ETL_ERROR(e) (e(__FILE__, __LINE__)) // Make an exception with the file name and line number.
#define ETL_ERROR(e) (e(__FILE__, __LINE__)) // Make an exception with the file name and line number.
#define ETL_ERROR_WITH_VALUE(e, v) (e(__FILE__, __LINE__, (v))) // Make an exception with the file name, line number and value.
#else
#define ETL_ERROR(e) (e("", __LINE__)) // Make an exception with the line number.
#define ETL_ERROR(e) (e("", __LINE__)) // Make an exception with the line number.
#define ETL_ERROR_WITH_VALUE(e, v) (e("", __LINE__, (v))) // Make an exception with the file name, line number and value.
#endif

#if defined(ETL_VERBOSE_ERRORS)
Expand Down

0 comments on commit 890195f

Please sign in to comment.