Skip to content

Commit

Permalink
make exception classes publicly visible
Browse files Browse the repository at this point in the history
Signed-off-by: Sorin Vatasoiu <Sorin.Vatasoiu@Point72.com>
  • Loading branch information
svatasoiu committed Jul 19, 2024
1 parent 9a37a8f commit 35691cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cpp/csp/core/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace csp
{

class Exception : public std::exception
class DLL_PUBLIC Exception : public std::exception
{
public:
Exception( const char * exType, const std::string & description, const char * file, const char * func, int line ) :
Expand Down Expand Up @@ -59,7 +59,7 @@ class Exception : public std::exception
};

#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#define CSP_DECLARE_EXCEPTION( DerivedException, BaseException ) class DerivedException : public BaseException { public: DerivedException( const char * exType, const std::string &r, const char * file, const char * func, int line ) : BaseException( exType, r, file, func, line ) {} };
#define CSP_DECLARE_EXCEPTION( DerivedException, BaseException ) class DLL_PUBLIC DerivedException : public BaseException { public: DerivedException( const char * exType, const std::string &r, const char * file, const char * func, int line ) : BaseException( exType, r, file, func, line ) {} };

CSP_DECLARE_EXCEPTION( AssertionError, Exception )
CSP_DECLARE_EXCEPTION( RuntimeException, Exception )
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/python/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace csp::python
{

class PythonPassthrough : public csp::Exception
class DLL_PUBLIC PythonPassthrough : public csp::Exception
{
public:
PythonPassthrough( const char * exType, const std::string &r, const char * file,
Expand Down

0 comments on commit 35691cb

Please sign in to comment.