@@ -94,8 +94,14 @@ LiteralValue* ExecutionLinkedValue::getValue() const {
9494 unique_ptr<LiteralValue> intermediateValue = nullptr ;
9595 if ( _name == get<0 >(_methodsList.front ()) )
9696 {
97- if ( !Context::getInstance ()->executeFunction (_name,get<1 >(_methodsList.front ())->getValue ()) )
98- throw SemanticException (" Unknown function name" , this ->getCodeReference ());
97+ try {
98+ if ( !Context::getInstance ()->executeFunction (_name,get<1 >(_methodsList.front ())->getValue ()) )
99+ throw SemanticException (" Unknown function name" , this ->getCodeReference ());
100+ }
101+ catch (const SemanticException& e)
102+ {
103+ throw SemanticException (e.what (),this ->getCodeReference ());
104+ }
99105 intermediateValue = unique_ptr<LiteralValue>(Context::getInstance ()->getReturnValue ());
100106 }
101107 else
@@ -107,8 +113,14 @@ LiteralValue* ExecutionLinkedValue::getValue() const {
107113
108114 if ( firstMethod )
109115 {
110- if ( !Context::getInstance ()->executeMethod (_name,get<0 >(method),args.get ()) )
111- throw SyntaxException (" Unknown method name" ,get<1 >(method)->getCodeReference ());
116+ try {
117+ if ( !Context::getInstance ()->executeMethod (_name,get<0 >(method),args.get ()) )
118+ throw SyntaxException (" Unknown method name" ,get<1 >(method)->getCodeReference ());
119+ }
120+ catch (const SemanticException& e)
121+ {
122+ throw SemanticException (e.what (),get<1 >(method)->getCodeReference ());
123+ }
112124 firstMethod = false ;
113125 intermediateValue = unique_ptr<LiteralValue>(Context::getInstance ()->getReturnValue ());
114126 }
0 commit comments