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

  1 martin 1.3 //%LICENSE////////////////////////////////////////////////////////////////
  2            // 
  3            // Licensed to The Open Group (TOG) under one or more contributor license
  4            // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5            // this work for additional information regarding copyright ownership.
  6            // Each contributor licenses this file to you under the OpenPegasus Open
  7            // Source License; you may not use this file except in compliance with the
  8            // License.
  9            // 
 10            // Permission is hereby granted, free of charge, to any person obtaining a
 11            // copy of this software and associated documentation files (the "Software"),
 12            // to deal in the Software without restriction, including without limitation
 13            // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14            // and/or sell copies of the Software, and to permit persons to whom the
 15            // Software is furnished to do so, subject to the following conditions:
 16            // 
 17            // The above copyright notice and this permission notice shall be included
 18            // in all copies or substantial portions of the Software.
 19            // 
 20            // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21            // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 22 martin 1.3 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23            // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24            // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25            // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26            // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27            // 
 28            //////////////////////////////////////////////////////////////////////////
 29 j.alex 1.2 //
 30            // Author: John Alex, IBM         (johnalex@us.ibm.com)
 31            //
 32            //
 33            //%/////////////////////////////////////////////////////////////////////////////
 34            
 35            #include <Pegasus/Common/Config.h>
 36            #include <Pegasus/Common/Exception.h>
 37            #include "StressTestControllerException.h"
 38            
 39            PEGASUS_NAMESPACE_BEGIN
 40            
 41            
 42            /**
 43              
 44                Default exception identifier.  This identifier is used if the specified
 45                identifier is out of range.  This identifier corresponds to a default
 46                (generic) message in the array of exception message strings.
 47              
 48             */
 49            const Uint32 StressTestControllerException::DEFAULT_ID = 0;
 50 j.alex 1.2 
 51            /**
 52              
 53                Minimum valid exception identifier.
 54              
 55             */
 56            const Uint32 StressTestControllerException::MIN_ID = DEFAULT_ID;
 57            
 58            /**
 59              
 60                Exception identifier indicating "Syntax Error" with client option.
 61              
 62             */
 63            
 64            const Uint32 StressTestControllerException::INVALID_OPTION = 1;
 65            
 66            /**
 67              
 68                Exception identifier indicating "Syntax Error" with client option operator.
 69              
 70             */
 71 j.alex 1.2 const Uint32 StressTestControllerException::INVALID_OPERATOR = 2;
 72            
 73            /**
 74              
 75                Exception identifier indicating "Missing closing square brace".
 76              
 77             */
 78            const Uint32 StressTestControllerException::MISSING_BRACE = 3;
 79            
 80            /**
 81              
 82                Exception identifier indicating "Missing value for client option".
 83              
 84             */
 85            const Uint32 StressTestControllerException::MISSING_VALUE = 4;
 86            
 87            /**
 88              
 89                Maximum valid exception identifier.  This value must be updated when
 90                a new exception identifier and message are added.
 91              
 92 j.alex 1.2  */
 93            const Uint32 StressTestControllerException::MAX_ID = 
 94                StressTestControllerException::MISSING_VALUE;
 95            
 96            /**
 97            
 98                Exception message strings.  The exception identifier is used as an
 99                index into this array to retrieve the appropriate exception message
100                string.  When a new identifier is added, this array must be updated
101                appropriately.
102            
103             */
104            const char*  StressTestControllerException::_messageStrings [] =
105            {
106                "Error in TestStressTestController command: ",
107                "Syntax Error Client option name: ",
108                "Syntax Error Client option operator: ",
109                "Missing closing square brace: ",
110                "Missing value for client option: "
111            };
112            
113 j.alex 1.2 /**
114              
115                Constructs a StressTestControllerException with a message corresponding to
116                the specified exception ID.
117              
118                @param  ID                the integer exception identifier
119              
120             */
121            StressTestControllerException::StressTestControllerException (
122                Uint32 ID) : CommandException 
123                                 (_messageStrings [(ID > MAX_ID) ? DEFAULT_ID : ID])
124            {
125            }
126            
127            /**
128              
129                Constructs a StressTestControllerException with the specified message.
130              
131                @param  exceptionMessage  a string containing the exception message
132              
133             */
134 j.alex 1.2 StressTestControllerException::StressTestControllerException (
135                const String& exceptionMessage) : CommandException (exceptionMessage)
136            {
137            }
138            
139            PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2