Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
assert.cpp
Go to the documentation of this file.
1
#include "
barretenberg/common/assert.hpp
"
2
#include "
barretenberg/common/throw_or_abort.hpp
"
3
4
namespace
bb
{
5
AssertMode
&
get_assert_mode
()
6
{
7
static
AssertMode
current_mode =
AssertMode::ABORT
;
8
return
current_mode;
9
}
10
11
void
assert_failure
(std::string
const
& err)
12
{
13
if
(
get_assert_mode
() ==
AssertMode::WARN
) {
14
info
(
"NOT FOR PROD - assert as warning: "
, err);
15
return
;
16
}
17
throw_or_abort
(err);
18
}
19
}
// namespace bb
assert.hpp
info
void info(Args... args)
Definition
log.hpp:74
bb
Entry point for Barretenberg command-line interface.
Definition
acir_format_getters.cpp:6
bb::get_assert_mode
AssertMode & get_assert_mode()
Definition
assert.cpp:5
bb::assert_failure
void assert_failure(std::string const &err)
Definition
assert.cpp:11
bb::AssertMode
AssertMode
Definition
assert.hpp:15
bb::AssertMode::WARN
@ WARN
bb::AssertMode::ABORT
@ ABORT
throw_or_abort.hpp
throw_or_abort
void throw_or_abort(std::string const &err)
Definition
throw_or_abort.hpp:6
src
barretenberg
common
assert.cpp
Generated by
1.9.8