#include <JavaExcn.h>
Inheritance diagram for JavaExcn:
Public Member Functions | |
JavaExcn (jthrowable javaExceptionInit) | |
Constructs a new JavaExcn. | |
jthrowable | getJavaException () const |
| |
const std::string & | getStackTrace () const |
| |
virtual void | throwSelf () |
virtual const char * | what () const throw () |
std::string const & | getMessage () |
Protected Attributes | |
std::string | msg |
Private Attributes | |
jthrowable | javaException |
REVIEW jvs 23-Aug-2007: If any code actually handles one of these and carries on, it may need to delete the local jthrowable reference to avoid a leak.
Definition at line 42 of file JavaExcn.h.
JavaExcn::JavaExcn | ( | jthrowable | javaExceptionInit | ) | [explicit] |
Constructs a new JavaExcn.
javaExceptionInit | the wrapped Java exception |
Definition at line 29 of file JavaExcn.cpp.
References JniUtil::classUtil, javaException, JniUtil::methUtilGetStackTrace, FennelExcn::msg, and JniUtil::toStdString().
00030 : FennelExcn("FennelJavaExcn") 00031 { 00032 javaException = javaExceptionInit; 00033 00034 // Initialize the msg field to the stack trace. It is necessary to 00035 // store the stack trace, so that 'what' can hand out a 'const 00036 // char *'. 00037 JniEnvAutoRef pEnv; 00038 jstring s = reinterpret_cast<jstring>( 00039 pEnv->CallStaticObjectMethod( 00040 JniUtil::classUtil, 00041 JniUtil::methUtilGetStackTrace, 00042 javaException)); 00043 msg = JniUtil::toStdString(pEnv, s); 00044 }
jthrowable JavaExcn::getJavaException | ( | ) | const |
Definition at line 46 of file JavaExcn.cpp.
References javaException.
Referenced by JavaThreadTracker::cloneExcn(), and JniEnvRef::handleExcn().
00047 { 00048 return javaException; 00049 }
const std::string & JavaExcn::getStackTrace | ( | ) | const |
Definition at line 51 of file JavaExcn.cpp.
References FennelExcn::msg.
00052 { 00053 return msg; 00054 }
void JavaExcn::throwSelf | ( | ) | [virtual] |
const char * FennelExcn::what | ( | ) | const throw () [virtual, inherited] |
Definition at line 38 of file FennelExcn.cpp.
References FennelExcn::msg.
Referenced by CalcExtMathTest::testCalcExtMathLogarithmsFails(), CalcExtMathTest::testCalcExtMathPow(), and CalcExtMathTest::testCalcExtMathPowFails().
00039 { 00040 return msg.c_str(); 00041 }
std::string const& FennelExcn::getMessage | ( | ) | [inline, inherited] |
Definition at line 52 of file FennelExcn.h.
Referenced by CalcAssembler::assemble(), CalcAssemblerTestCase::assemble(), CalcAssembler::bindRegisterValue(), CalcAssembler::createInstruction(), CalcExecStream::execute(), JniEnvRef::handleExcn(), CalcExtWinAggFuncTest::initWindowedAggDataBlock(), FlatFileExecStreamImpl::open(), CalcExecStream::prepare(), BackupRestoreTest::testBackupCleanup(), CalcInstFactoryTest::testBool(), CalcInstFactoryTest::testBoolNative(), CalcInstFactoryTest::testBoolPointer(), CalcMiscTest::testCalcContinueOnException(), CalcExtCastTest::testCalcExtCastApproxToString(), CalcExtCastTest::testCalcExtCastBigExactToString(), CalcExtCastTest::testCalcExtCastBooleanToChar(), CalcExtCastTest::testCalcExtCastBooleanToVarChar(), CalcExtCastTest::testCalcExtCastCharToBoolean(), CalcExtCastTest::testCalcExtCastCharToDecimal(), CalcExtCastTest::testCalcExtCastCharToExact(), CalcExtCastTest::testCalcExtCastDecimalToChar(), CalcExtCastTest::testCalcExtCastDecimalToStringTruncates(), CalcExtCastTest::testCalcExtCastDecimalToVarChar(), CalcExtCastTest::testCalcExtCastExactToChar(), CalcExtCastTest::testCalcExtCastExactToStringTruncates(), CalcExtCastTest::testCalcExtCastExactToVarChar(), CalcExtCastTest::testCalcExtCastStringToApprox(), CalcExtCastTest::testCalcExtCastStringToChar(), CalcExtCastTest::testCalcExtCastStringToDecimalFails(), CalcExtCastTest::testCalcExtCastStringToDecimalMinMax(), CalcExtCastTest::testCalcExtCastStringToDecimalRange(), CalcExtCastTest::testCalcExtCastStringToExactFails(), CalcExtCastTest::testCalcExtCastStringToVarChar(), CalcExtCastTest::testCalcExtCastVarCharToBoolean(), CalcExtCastTest::testCalcExtCastVarCharToDecimal(), CalcExtCastTest::testCalcExtCastVarCharToExact(), CalcExtContextTest::testCalcExtContext(), CalcExtDateTimeTest::testCalcExtConvertDateToString(), CalcExtDynamicVariableTest::testCalcExtDynamicVariable(), CalcExtDateTimeTest::testCalcExtLocalTime(), CalcExtDateTimeTest::testCalcExtLocalTimestamp(), CalcExtMathTest::testCalcExtMathAbs(), CalcExtMathTest::testCalcExtMathLogarithms(), CalcExtMathTest::testCalcExtMathLogarithmsFails(), CalcExtMathTest::testCalcExtMathPow(), CalcExtMathTest::testCalcExtMathPowFails(), CalcExtRegExpTest::testCalcExtRegExpLikeAChar(), CalcExtRegExpTest::testCalcExtRegExpLikeAVarChar(), CalcExtRegExpTest::testCalcExtRegExpSimilarAChar(), CalcExtRegExpTest::testCalcExtRegExpSimilarAVarChar(), CalcExtStringTest::testCalcExtStringCatA2(), CalcExtStringTest::testCalcExtStringCatA3(), CalcExtStringTest::testCalcExtStringCmpA(), CalcExtStringTest::testCalcExtStringCmpOct(), CalcExtStringTest::testCalcExtStringLenBitA(), CalcExtStringTest::testCalcExtStringLenCharA(), CalcExtStringTest::testCalcExtStringLenOctA(), CalcExtStringTest::testCalcExtStringOverlayA4(), CalcExtStringTest::testCalcExtStringOverlayA5(), CalcExtStringTest::testCalcExtStringPosA(), CalcExtStringTest::testCalcExtStringSubStringA3(), CalcExtStringTest::testCalcExtStringSubStringA4(), CalcExtStringTest::testCalcExtStringToANull(), CalcExtStringTest::testCalcExtStringToLower(), CalcExtStringTest::testCalcExtStringToUpper(), CalcExtStringTest::testCalcExtStringTrim(), CalcMiscTest::testCalcRaise(), CalcMiscTest::testCalcRefInst(), CalcMiscTest::testCalcReturn(), CalcMiscTest::testCalcStatusReg(), CalcMiscTest::testCalcStatusRegZero(), CalcCastTest::testExe(), ExecStreamGovernorTest::testGovernor(), CalcInstFactoryTest::testIntegralNative(), CalcInstFactoryTest::testIntegralPointer(), CalcInstFactoryTest::testJump(), CalcInstFactoryTest::testNativeNative(), CalcInstFactoryTest::testPointerIntegral(), CalcInstFactoryTest::testPointerPointer(), CalcInstFactoryTest::testReturn(), CalcCastTest::testRoundInstruction(), WinAggAddTest(), WinAggAddTestStr(), WinAggDropTest(), and WinAggDropTestStr().
00053 { 00054 return msg; 00055 }
jthrowable JavaExcn::javaException [private] |
std::string FennelExcn::msg [protected, inherited] |
Definition at line 35 of file FennelExcn.h.
Referenced by BTreeDuplicateKeyExcn::BTreeDuplicateKeyExcn(), CalcExcn::CalcExcn(), getStackTrace(), SysCallExcn::init(), InvalidParamExcn::InvalidParamExcn(), InvalidValueException< T >::InvalidValueException(), JavaExcn(), TupleOverflowExcn::TupleOverflowExcn(), and FennelExcn::what().