Update of /cvsroot/gmod/apollo/src/java/apollo/dataadapter
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2747/apollo/dataadapter
Modified Files:
AbstractApolloAdapter.java
Log Message:
A missing tiers file is pretty serious--throw an exception
rather than just printing an error message and continuing.
Index: AbstractApolloAdapter.java
===================================================================
RCS file: /cvsroot/gmod/apollo/src/java/apollo/dataadapter/AbstractApolloAdapter.java,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** AbstractApolloAdapter.java 30 Jun 2005 22:26:12 -0000 1.57
--- AbstractApolloAdapter.java 2 Aug 2005 18:01:29 -0000 1.58
***************
*** 174,178 ****
Split into 2 methods? fireDataLoadEvent and setStyle? or rename newDataLoading?
*/
! protected void clearOldData() {
notifyNewData(); // send out DataLoadEvent
//apollo.config.Config.newDataAdapter(this); // to pick up new style
--- 174,179 ----
Split into 2 methods? fireDataLoadEvent and setStyle? or rename newDataLoading?
*/
! protected void clearOldData()
! throws ApolloAdapterException {
notifyNewData(); // send out DataLoadEvent
//apollo.config.Config.newDataAdapter(this); // to pick up new style
***************
*** 185,195 ****
+ style.getAllStyleFilesString());
String tiers = style.getTiersFile();
if (tiers == null) {
! Config.errorDialog("Can't find Types (tiers) file for style file " +
! style.getFileName() +
! ".\nPlease fix the Types parameter in " +
! style.getFileName() +
! "\nand check that a style file is not trying to include itself." +
! ".\nYou may then need to restart Apollo.");
}
else
--- 186,203 ----
+ style.getAllStyleFilesString());
String tiers = style.getTiersFile();
+ // A missing tiers file is pretty serious--better throw an exception.
if (tiers == null) {
! String message = "\nFatal error: can't find Types (tiers) file!" +
! "\nPlease fix the Types parameter in " +
! style.getFileName() +
! "\n(and if that looks ok, check that a style file is not trying to include itself)." +
! ".\nYou will then need to restart Apollo.";
! if (style.getFileName().indexOf("game.style") >= 0)
! message += "\n\nYou seem to be using game.style as your primary style file.\n" +
! "Note that game.style is an abstract style that does not include a Types\n" +
! "file setting. You should be using fly.style or rice.style, each of which\n" +
! "inherits from game.style";
! // Config.errorDialog(message);
! throw new ApolloAdapterException(message);
}
else
|