mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve json exception handling
This commit is contained in:
@@ -20,8 +20,10 @@
|
||||
#ifndef RIPPLE_JSON_JSON_ASSERT_H_INCLUDED
|
||||
#define RIPPLE_JSON_JSON_ASSERT_H_INCLUDED
|
||||
|
||||
#include "ripple/json/json_errors.h"
|
||||
|
||||
#define JSON_ASSERT_UNREACHABLE assert( false )
|
||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) ripple::Throw<std::runtime_error> ( message );
|
||||
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) ripple::Throw<Json::error> ( message );
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user