gdl/gdl-catch.patch

123 lines
3.8 KiB
Diff
Raw Normal View History

diff -up gdl-0.9.8/src/basic_fun.cpp.catch gdl-0.9.8/src/basic_fun.cpp
--- gdl-0.9.8/src/basic_fun.cpp.catch 2018-03-26 03:57:27.000000000 -0600
+++ gdl-0.9.8/src/basic_fun.cpp 2018-03-26 16:54:13.508994366 -0600
@@ -1505,7 +1505,7 @@ namespace lib {
if( !compileFlags) GDLInterpreter::ReportCompileError( ex);
return new DIntGDL( 0);
}
- catch( ANTLRException ex)
+ catch( ANTLRException& ex)
{
if( !compileFlags) cerr << "EXECUTE: Lexer/Parser exception: " <<
ex.getMessage() << endl;
@@ -1529,7 +1529,7 @@ namespace lib {
return new DIntGDL( 0);
}
- catch( ANTLRException ex)
+ catch( ANTLRException& ex)
{
if( !compileFlags) cerr << "EXECUTE: Compiler exception: " <<
ex.getMessage() << endl;
@@ -1570,7 +1570,7 @@ namespace lib {
ex.getMessage() << endl;
return new DIntGDL( 0);
}
- catch( ANTLRException ex)
+ catch( ANTLRException& ex)
{
caller->ResizeForLoops( nForLoopsIn);
@@ -6456,7 +6456,7 @@ template <typename Ty, typename T2> sta
try {
oStruct = e->GetObjHeap( objRef);
}
- catch ( GDLInterpreter::HeapException )
+ catch ( GDLInterpreter::HeapException& )
{ // non valid object
if( count)
e->SetKW( countIx, new DLongGDL( 0));
diff -up gdl-0.9.8/src/dinterpreter.cpp.catch gdl-0.9.8/src/dinterpreter.cpp
--- gdl-0.9.8/src/dinterpreter.cpp.catch 2018-03-26 03:57:27.000000000 -0600
+++ gdl-0.9.8/src/dinterpreter.cpp 2018-03-26 16:53:15.635298830 -0600
@@ -143,7 +143,7 @@ DStructGDL* GDLInterpreter::ObjectStruct
try {
oStructGDL= GetObjHeap( o);
}
- catch ( HeapException)
+ catch ( HeapException&)
{
throw GDLException( mp, "Object not valid: "+Name(self));
}
@@ -578,12 +578,12 @@ bool GDLInterpreter::CompileFile(const s
return false;
}
}
- catch( GDLException e)
+ catch( GDLException& e)
{
ReportCompileError( e, f);
return false;
}
- catch( ANTLRException e)
+ catch( ANTLRException& e)
{
cerr << "Lexer/Parser exception: " << e.getMessage() << endl;
return false;
@@ -612,13 +612,13 @@ bool GDLInterpreter::CompileFile(const s
if( treeParser.ActiveProCompiled()) RetAll();
}
- catch( GDLException e)
+ catch( GDLException& e)
{
ReportCompileError( e, f);
if( treeParser.ActiveProCompiled()) RetAll();
return false;
}
- catch( ANTLRException e)
+ catch( ANTLRException& e)
{
cerr << "Compiler exception: " << e.getMessage() << endl;
if( treeParser.ActiveProCompiled()) RetAll();
@@ -705,7 +705,7 @@ DInterpreter::CommandCode DInterpreter::
// default is more verbose
CompileFile( argstr); //, origstr);
}
- catch( RetAllException)
+ catch( RetAllException&)
{
// delay the RetAllException until finished
retAll = true;
@@ -771,7 +771,7 @@ DInterpreter::CommandCode DInterpreter::
// default is more verbose
CompileFile( argstr); //, origstr);
}
- catch( RetAllException)
+ catch( RetAllException&)
{
// delay the RetAllException until finished
retAll = true;
diff -up gdl-0.9.8/src/getfmtast.cpp.catch gdl-0.9.8/src/getfmtast.cpp
--- gdl-0.9.8/src/getfmtast.cpp.catch 2018-03-26 03:57:27.000000000 -0600
+++ gdl-0.9.8/src/getfmtast.cpp 2018-03-26 16:54:32.793899215 -0600
@@ -68,15 +68,15 @@ RefFMTNode GetFMTAST( DString fmtString)
cout << endl;
#endif
}
- catch( GDLException ex)
+ catch( GDLException& ex)
{
throw GDLException("Format: "+ex.getMessage());
}
- catch( antlr::ANTLRException ex)
+ catch( antlr::ANTLRException& ex)
{
throw GDLException("Format parser: "+ex.getMessage());
}
- catch( exception ex)
+ catch( exception& ex)
{
throw GDLException("Format exception: "+string(ex.what()));
}