1 // Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and 2 // other Axom Project Developers. See the top-level COPYRIGHT file for details. 3 // 4 // SPDX-License-Identifier: (BSD-3-Clause) 5 6 #include "axom/klee/KleeError.hpp" 7 8 #include "axom/slic/interface/slic_macros.hpp" 9 10 namespace axom 11 { 12 namespace klee 13 { KleeError(const inlet::VerificationError & error)14KleeError::KleeError(const inlet::VerificationError &error) : m_errors {{error}} 15 { } 16 KleeError(const std::vector<inlet::VerificationError> & errors)17KleeError::KleeError(const std::vector<inlet::VerificationError> &errors) 18 : m_errors {errors} 19 { 20 SLIC_ASSERT_MSG(!m_errors.empty(), "Must provide at least one error"); 21 } 22 what() const23const char *KleeError::what() const noexcept 24 { 25 return m_errors[0].message.data(); 26 } 27 28 } // namespace klee 29 } // namespace axom 30