Skip to content

Commit

Permalink
improve exc
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonKoerner committed Feb 3, 2024
1 parent ce3703d commit a51ef9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bn256/exc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ static char ms_GlobExcp[4096] = { 0 };
static int ms_GlobExcpLen = 0;



#if defined(_MSC_VER)
class InternalException : public std::exception
{
public:
InternalException(const char* err) : std::exception(err) {}
};
#endif

void ThrowException(const char* s_Messg)
{
ms_GlobExcpLen = strlen(s_Messg);
memcpy(ms_GlobExcp, s_Messg, ms_GlobExcpLen);
#if defined(_MSC_VER)
throw InternalException(s_Messg);
#else
throw std::exception();
#endif
}


Expand Down

0 comments on commit a51ef9d

Please sign in to comment.