summaryrefslogtreecommitdiffstats
path: root/example/net/poettering
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2018-06-06 10:49:24 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-06-12 17:40:00 +0000
commit75a2e25322abee603dc51032c734a27bfd4df90d (patch)
tree80fd192cfdf9db0a00b23ba474611a27346ff717 /example/net/poettering
parentee6ac694c3e21b24ebd2f32ef55249c5eb44bccd (diff)
downloadsdbusplus-75a2e25322abee603dc51032c734a27bfd4df90d.tar.gz
sdbusplus-75a2e25322abee603dc51032c734a27bfd4df90d.zip
property: Add errors support
Add errors support for properties. Closes openbmc/openbmc#1641 Tested: Verified that when an interface threw a defined property error, the generated code caught it and returned an error to the REST call. Change-Id: I8cb8c77995026f12e373291822e4e0a623a84d81 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'example/net/poettering')
-rw-r--r--example/net/poettering/Calculator.errors.yaml3
-rw-r--r--example/net/poettering/Calculator.interface.yaml6
2 files changed, 9 insertions, 0 deletions
diff --git a/example/net/poettering/Calculator.errors.yaml b/example/net/poettering/Calculator.errors.yaml
index 730e2a3..b2f6ee3 100644
--- a/example/net/poettering/Calculator.errors.yaml
+++ b/example/net/poettering/Calculator.errors.yaml
@@ -1,3 +1,6 @@
- name: DivisionByZero
description: >
An attempt to divide by zero was attempted.
+- name: PermissionDenied
+ description: >
+ The user does not have enough privileges to perform the operation.
diff --git a/example/net/poettering/Calculator.interface.yaml b/example/net/poettering/Calculator.interface.yaml
index d289c21..af4dd1b 100644
--- a/example/net/poettering/Calculator.interface.yaml
+++ b/example/net/poettering/Calculator.interface.yaml
@@ -55,6 +55,12 @@ properties:
default: Success
description: >
The current state of the Calculator.
+ - name: Owner
+ type: string
+ description: >
+ The name of the owner of the Calculator.
+ errors:
+ - self.Error.PermissionDenied
signals:
- name: Cleared
description: >
OpenPOWER on IntegriCloud