(file) Return to StressTestControllerException.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / test / StressTestController

Diff for /pegasus/test/StressTestController/StressTestControllerException.cpp between version 1.1.2.1 and 1.1.2.2

version 1.1.2.1, 2006/04/18 03:15:28 version 1.1.2.2, 2006/04/24 19:15:09
Line 35 
Line 35 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/ExceptionRep.h>  #include <Pegasus/Common/Exception.h>
 #include "StressTestControllerException.h" #include "StressTestControllerException.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
Line 59 
Line 59 
  
 /** /**
  
    Exception identifier indicating a connection failure.      Exception identifier indicating "Syntax Error" with client option.
  
  */  */
  
 const Uint32 StressTestControllerException::CONNECT_FAIL = 1;  const Uint32 StressTestControllerException::INVALID_OPTION = 1;
  
 /** /**
  
     Exception identifier indicating timed out waiting for response.      Exception identifier indicating "Syntax Error" with client option operator.
  
  */  */
 const Uint32 StressTestControllerException::TIMED_OUT = 2;  const Uint32 StressTestControllerException::INVALID_OPERATOR = 2;
  
 /** /**
  
     Exception identifier indicating invalid input.      Exception identifier indicating "Missing closing square brace".
  
  */  */
 const Uint32 StressTestControllerException::INVALID_INPUT = 3;  const Uint32 StressTestControllerException::MISSING_BRACE = 3;
   
   /**
   
       Exception identifier indicating "Missing value for client option".
   
    */
   const Uint32 StressTestControllerException::MISSING_VALUE = 4;
  
 /** /**
  
Line 85 
Line 92 
     a new exception identifier and message are added.     a new exception identifier and message are added.
  
  */  */
 const Uint32 StressTestControllerException::MAX_ID = StressTestControllerException::INVALID_INPUT;  const Uint32 StressTestControllerException::MAX_ID =
       StressTestControllerException::MISSING_VALUE;
  
 /** /**
  
Line 97 
Line 105 
  */  */
 const char*  StressTestControllerException::_messageStrings [] = const char*  StressTestControllerException::_messageStrings [] =
 { {
     "Error in TestStressTestController command ",      "Error in TestStressTestController command: ",
     "Failed to connect to CIM server: ",      "Syntax Error Client option name: ",
     "Timed out waiting for response ",      "Syntax Error Client option operator: ",
     "Invalid input"      "Missing closing square brace: ",
       "Missing value for client option: "
 }; };
  
 /** /**
  
     Constructs a StressTestControllerException with a message corresponding to the      Constructs a StressTestControllerException with a message corresponding to
     specified exception ID.      the specified exception ID.
  
     @param  ID                the integer exception identifier     @param  ID                the integer exception identifier
  
  */  */
 StressTestControllerException::StressTestControllerException (Uint32 ID) : CommandException  StressTestControllerException::StressTestControllerException (
       Uint32 ID) : CommandException
     (_messageStrings [(ID > MAX_ID) ? DEFAULT_ID : ID])     (_messageStrings [(ID > MAX_ID) ? DEFAULT_ID : ID])
 { {
 } }
  
 /** /**
  
     Constructs a StressTestControllerException with a message corresponding to the  
     specified ID, appended with the specified String.  
   
     @param  ID                the integer exception identifier  
     @param  appendString      the string to append to the exception message  
   
  */  
 StressTestControllerException::StressTestControllerException (Uint32 ID, const String& appendString) :  
     CommandException (_messageStrings  
         [(ID > MAX_ID) ? DEFAULT_ID : ID])  
 {  
     _rep->message.append (appendString);  
 }  
   
 /**  
   
     Constructs a StressTestControllerException with the specified message.     Constructs a StressTestControllerException with the specified message.
  
     @param  exceptionMessage  a string containing the exception message     @param  exceptionMessage  a string containing the exception message
  
  */  */
 StressTestControllerException::StressTestControllerException (const String& exceptionMessage) :  StressTestControllerException::StressTestControllerException (
     CommandException (exceptionMessage)      const String& exceptionMessage) : CommandException (exceptionMessage)
 { {
 } }
  
 String ConfigFileSyntaxError::_formatMessage(  
     const String& file, Uint32 line)  
 {  
     char buffer[32];  
     sprintf(buffer, "%d", line);  
   
 //l10n  
     //String result = "Syntax error in configuration file: ";  
     MessageLoaderParms parms("Config.ConfigExceptions.CONFIG_FILE_SYNTAX_ERR","Syntax error in configuration file: ");  
     String result = MessageLoader::getMessage(parms);  
 //l10n end  
     result.append(file);  
     result.append("( Line number# ");  
     result.append(buffer);  
     result.append(")");  
     return result;  
 }  
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2