You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/11/12 04:56:12 UTC
svn commit: r473864 -
/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp
Author: jsdelfino
Date: Sat Nov 11 19:56:12 2006
New Revision: 473864
URL: http://svn.apache.org/viewvc?view=rev&rev=473864
Log:
Zero init first location entry in new SDORuntimeExceptions to allow the SCA runtime to determine if there is a location or not
Modified:
incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp
Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp?view=diff&rev=473864&r1=473863&r2=473864
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp Sat Nov 11 19:56:12 2006
@@ -37,6 +37,10 @@
message_text = new char[strlen(msg_text)+1];
strcpy(message_text,msg_text);
+ locations[0].file = 0;
+ locations[0].line = 0;
+ locations[0].function = 0;
+
} // end SDORuntimeException constuctor
// ========================================================================
@@ -51,13 +55,22 @@
strcpy(class_name, c.getEClassName());
message_text = new char[strlen(c.getMessageText())+1];
strcpy(message_text,c.getMessageText());
- for (int i=0;i<c.location_set;i++)
+ if (c.location_set)
{
- locations[i].file = new char[strlen(c.locations[i].file) + 1];
- strcpy(locations[i].file,c.locations[i].file);
- locations[i].line = c.locations[i].line;
- locations[i].function = new char[strlen(c.locations[i].function) + 1];
- strcpy(locations[i].function, c.locations[i].function);
+ for (int i=0;i<c.location_set;i++)
+ {
+ locations[i].file = new char[strlen(c.locations[i].file) + 1];
+ strcpy(locations[i].file,c.locations[i].file);
+ locations[i].line = c.locations[i].line;
+ locations[i].function = new char[strlen(c.locations[i].function) + 1];
+ strcpy(locations[i].function, c.locations[i].function);
+ }
+ }
+ else
+ {
+ locations[0].file = 0;
+ locations[0].line = 0;
+ locations[0].function = 0;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org