Skip to content

WIP: Frost relaxed SM #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ AC_CONFIG_FILES([Makefile
src/tools/Makefile
src/core/Makefile
src/service/Makefile
src/app/Makefile
src/frost/Makefile
test/Makefile
test/core/Makefile
test/p2p/Makefile
test/service/Makefile
test/frost/Makefile
test/testlib/Makefile
contrib/Makefile])


Expand Down
30 changes: 29 additions & 1 deletion contrib/catch/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10690,6 +10690,31 @@ void ExceptionTranslatorRegistry::registerTranslator( const IExceptionTranslator
}

#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)


template<typename E>
std::string translateIfNestedException(E &e, std::size_t level) {
try {
std::rethrow_if_nested(e);
return std::string();
}
catch( std::exception& e1 ) {
return std::string("\n") + std::string(level*2, ' ') + e1.what() + translateIfNestedException(e1, level + 1);
}
catch( std::string& msg ) {
return std::string("\n") + std::string(level*2, ' ') + msg;
}
catch( std::nested_exception& e1 ) {
return std::string("\n") + std::string(level*2, ' ') + "Unknown exception" + translateIfNestedException(e1, level + 1);
}
catch( const char* msg ) {
return std::string("\n") + std::string(level*2, ' ') + msg;
}
catch(...) {
return std::string("\n") + std::string(level*2, ' ') + "Unknown exception";
}
}

std::string ExceptionTranslatorRegistry::translateActiveException() const {
try {
#ifdef __OBJC__
Expand Down Expand Up @@ -10719,11 +10744,14 @@ std::string ExceptionTranslatorRegistry::translateActiveException() const {
std::rethrow_exception(std::current_exception());
}
catch( std::exception& ex ) {
return ex.what();
return std::string(ex.what()) + translateIfNestedException(ex, 1);
}
catch( std::string& msg ) {
return msg;
}
catch( std::nested_exception& ex ) {
return "Unknown exception" + translateIfNestedException(ex, 1);
}
catch( const char* msg ) {
return msg;
}
Expand Down
Loading