ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/core/Core.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/core/Core.java (file contents):
Revision 1.13 by tdb, Mon Nov 20 18:44:49 2000 UTC vs.
Revision 1.14 by ajm, Mon Nov 20 21:10:09 2000 UTC

# Line 90 | Line 90 | class Core {
90              objRef = orb.resolve_initial_references("NameService");
91              NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
92              
93 +            // check we got it
94 +            if (ncRef == null) {
95 +                throw new Exception("Unable to locate CORBA Naming Service for configured ORB!");
96 +            }
97 +            
98              // start and bind each server in turn
99              
100              // work out which logger to use
# Line 106 | Line 111 | class Core {
111              // get a reference to the servant as a Logger
112              Logger logRef = LoggerHelper.narrow(objRef);
113  
109
110
114              // create the Configurator
112            String configLocation = System.getProperty("uk.ac.ukc.iscream.ConfigurationLocation", defaultConfigPath);
115              ConfigurationManagerServant configManRef = new ConfigurationManagerServant(poa, logRef);
116              
117              // and advertise it to the naming context
# Line 130 | Line 132 | class Core {
132              
133              // there is already another CORE of the same name registered
134              if ( e instanceof org.omg.CosNaming.NamingContextPackage.AlreadyBound) {
135 <                System.err.println("ERROR: Another I-Scream CORE is already registered under the same name.");
135 >                System.err.println("CORE ERROR: Another I-Scream CORE is already registered under the same name.");
136              
137              // otherwise we don't know what happened
138 <            // so print the error and do a stack trace
138 >            // so print the error and do a stack trace if debug is enabled
139              } else {
140 <                System.err.println("CORE ERROR: " + e);
141 <                e.printStackTrace(System.out);
140 >                System.err.println("CORE ERROR: " + e.getMessage());
141 >                if (Integer.parseInt(System.getProperty("uk.ac.ukc.iscream.Verbosity")) == Logger.DEBUG) {
142 >                    System.err.println("*** DEBUG ENABLED - printing stack trace ***");
143 >                    e.printStackTrace(System.out);
144 >                }
145              }
146          }
147      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines