1 //******************************************************************
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 #ifndef _INITIALIZE_EXCEPTION_H_
7 #define _INITIALIZE_EXCEPTION_H_
14 class InitializeException : public std::exception
17 InitializeException(const std::string& msg, OCStackResult reasonCode): m_errorMessage(msg), m_reason(reasonCode)
21 OCStackResult ReasonCode()
28 return m_errorMessage;
37 case OC_STACK_INVALID_URI:
39 case OC_STACK_INVALID_IP:
41 case OC_STACK_INVALID_PORT:
42 return "Invalid Port";
43 case OC_STACK_INVALID_CALLBACK:
44 return "Invalid Callback";
45 case OC_STACK_INVALID_METHOD:
46 return "Invalid Method";
48 return "General Fault";
50 return "Unknown Error";
55 const std::string& m_errorMessage;
56 OCStackResult m_reason;