[GME-commit]
GMESRC/GME/Parser MgaParser.cpp,1.30,1.31 GenParser.cpp,1.12,1.13
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Fri Jan 13 23:17:09 CST 2006
Update of /project/gme-repository/GMESRC/GME/Parser
In directory escher:/tmp/cvs-serv26543
Modified Files:
MgaParser.cpp GenParser.cpp
Log Message:
Error message with location info in case of exceptions coming from MGA [meta incompatibility case most likely].
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaParser.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/MgaParser.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** MgaParser.cpp 18 May 2005 22:36:36 -0000 1.30
--- MgaParser.cpp 13 Jan 2006 23:17:06 -0000 1.31
***************
*** 30,33 ****
--- 30,35 ----
manual_relid_mode = project_prefs_orig & MGAPREF_MANUAL_RELIDS ? true : false;
+ m_GME = get_GME( p); // by zolmol
+
COMTHROW( p->Notify(APPEVENT_XML_IMPORT_FCOS_BEGIN));
***************
*** 117,124 ****
--- 119,131 ----
CloseAll();
+ clear_GME( m_GME);
}
catch(hresult_exception &e)
{
CloseAll();
+ // in case we rethrew the [probably MGA originated] exception
+ // we have set into errorinfo the location info
+ if( m_GME) COMTHROW( m_GME->ConsoleMessage( errorinfo, MSG_ERROR));
+ clear_GME( m_GME);
ASSERT( FAILED(e.hr) );
***************
*** 150,153 ****
--- 157,162 ----
manual_relid_mode = project_prefs_orig & MGAPREF_MANUAL_RELIDS ? true : false;
+ m_GME = get_GME( p); // by zolmol
+
COMTHROW( project->Notify(APPEVENT_XML_IMPORT_BEGIN));
***************
*** 234,241 ****
--- 243,255 ----
CloseAll();
+ clear_GME( m_GME);
}
catch(hresult_exception &e)
{
CloseAll();
+ // in case we rethrew the [probably MGA originated] exception
+ // we have set into errorinfo the location info
+ if( m_GME) COMTHROW( m_GME->ConsoleMessage( errorinfo, MSG_ERROR));
+ clear_GME( m_GME);
ASSERT( FAILED(e.hr) );
Index: GenParser.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/GenParser.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** GenParser.cpp 26 Jan 2005 17:30:58 -0000 1.12
--- GenParser.cpp 13 Jan 2006 23:17:06 -0000 1.13
***************
*** 157,160 ****
--- 157,166 ----
err_line = locator->getLineNumber();
err_column = locator->getColumnNumber();
+
+ // we compose and set the error message for exceptions
+ // [which come from the MGA layer because of meta incompatibility]
+ std::string str;
+ Format(str, "Improper use of object error in file %s at line %d, char %d.", xmlfile.c_str(), err_line, err_column);
+ CopyTo(str, errorinfo);
}
***************
*** 193,196 ****
--- 199,208 ----
err_line = locator->getLineNumber();
err_column = locator->getColumnNumber();
+
+ // we compose and set the error message for exceptions
+ // [which come from the MGA layer because of meta incompatibility]
+ std::string str;
+ Format(str, "Improper use of object error in file %s at line %d, char %d.", xmlfile.c_str(), err_line, err_column);
+ CopyTo(str, errorinfo);
}
More information about the GME-commit
mailing list