Add exception descriptions
authorcoderhyme <jhyo.kim@samsung.com>
Fri, 12 Jun 2015 06:04:25 +0000 (15:04 +0900)
committerUze Choi <uzchoi@samsung.com>
Wed, 17 Jun 2015 08:23:57 +0000 (08:23 +0000)
Change-Id: Ib0ac31a52a4ceb58b931426ea76745e4467b74f1
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1294
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
service/basis/common/primitiveResource/include/ResourceAttributes.h
service/basis/common/primitiveResource/src/ResourceAttributes.cpp

index 6ebb392..3fbc39e 100755 (executable)
@@ -162,7 +162,7 @@ public:
             }
             catch (const boost::bad_get&)
             {
-                throw BadGetException{ "" };
+                throw BadGetException{ "Wrong type" };
             }
         }
 
index 1d6c565..b558dfd 100755 (executable)
@@ -325,7 +325,7 @@ auto ResourceAttributes::at(const std::string& key) -> Value&
     }
     catch (const std::out_of_range&)
     {
-        throw InvalidKeyException{ "" };
+        throw InvalidKeyException{ "No attribute named '" + key + "'" };
     }
 }
 
@@ -337,7 +337,7 @@ auto ResourceAttributes::at(const std::string& key) const -> const Value&
     }
     catch (const std::out_of_range&)
     {
-        throw InvalidKeyException{ "" };
+        throw InvalidKeyException{ "No attribute named '" + key + "'" };
     }
 }