}
catch (const InternalError& ie)
{
+ // dont manage an error with the debugger
+ // in cases of try catch and errcatch
+ if(ConfigVariable::isSilentError())
+ {
+ throw ie;
+ }
+
ConfigVariable::fillWhereError(ie.GetErrorLocation().first_line);
const std::vector<ConfigVariable::WhereEntry>& lWhereAmI = ConfigVariable::getWhere();
ast::Exp* pExp = NULL;
int iID = 0;
types::Macro* pMacro = NULL;
+ bool bSilentError = ConfigVariable::isSilentError();
Parser parser;
wchar_t* pwstFile = NULL;
pSeqExp->setExecFrom(ast::SeqExp::EXEC);
pSeqExp->setReturnable();
std::unique_ptr<ast::ConstVisitor> exec(ConfigVariable::getDefaultVisitor());
+ ConfigVariable::setSilentError(bErrCatch);
try
{
}
catch (const ast::RecursionException& /* re */)
{
+ ConfigVariable::setSilentError(bSilentError);
+
//close opened scope during try
while (pCtx->getScopeLevel() > scope)
{
{
closeFile(file, iID, wstFile, pExp);
ConfigVariable::setPromptMode(oldVal);
+ ConfigVariable::setSilentError(bSilentError);
throw ia;
}
catch (const ast::InternalError& ie)
closeFile(file, iID, wstFile, pExp);
ConfigVariable::setPromptMode(oldVal);
ConfigVariable::setExecutedFile(L"");
+ ConfigVariable::setSilentError(bSilentError);
throw ie;
}
//restore previous prompt mode
ConfigVariable::setPromptMode(oldVal);
+ ConfigVariable::setSilentError(bSilentError);
if (bErrCatch)
{
out.push_back(new types::Double(iErr));
wchar_t* pstMsg = NULL;
ast::Exp* pExp = NULL;
wchar_t *pstCommand = NULL;
+ bool bSilentError = ConfigVariable::isSilentError();
Parser parser;
if (in.size() < 1 || in.size() > 3)
ast::SeqExp* pSeqExp = pExp->getAs<ast::SeqExp>();
std::unique_ptr<ast::ConstVisitor> run(ConfigVariable::getDefaultVisitor());
+ ConfigVariable::setSilentError(bErrCatch);
try
{
symbol::Context* pCtx = symbol::Context::getInstance();
}
catch (const ast::RecursionException& /* re */)
{
+ ConfigVariable::setSilentError(bSilentError);
+
//close opened scope during try
while (pCtx->getScopeLevel() > scope)
{
delete pExp;
ConfigVariable::macroFirstLine_end();
ConfigVariable::setPromptMode(iPromptMode);
+ ConfigVariable::setSilentError(bSilentError);
throw ie;
}
ConfigVariable::macroFirstLine_end();
ConfigVariable::setPromptMode(iPromptMode);
+ ConfigVariable::setSilentError(bSilentError);
delete pExp;
return types::Function::OK;