eo-cxx: Replace C++ throw with EFL_CXX_THROW.

This commit is contained in:
Savio S. Machado 2014-10-13 07:45:34 -03:00
parent b8ce446c2b
commit 0ca819974c
1 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,13 @@
#include "eo_ops.hh"
#include "eo_event.hh"
#ifndef EFL_CXX_THROW
#if defined ( EFL_CXX_NO_EXCEPTIONS )
# define EFL_CXX_THROW(x) std::abort()
#else
# define EFL_CXX_THROW(x) throw (x)
#endif
#endif
namespace efl { namespace eo {
@ -276,7 +283,7 @@ T downcast(U object)
}
else
{
throw std::runtime_error("Invalid cast");
EFL_CXX_THROW(std::runtime_error("Invalid cast"));
}
}