Skip to content

Commit 485ec11

Browse files
committed
Update documentation
1 parent 77ed792 commit 485ec11

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/error_handling.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ <h1 class="title">Module <code>pyControl4.error_handling</code></h1>
122122
elif await __checkResponseFormat(response_text) == &#34;XML&#34;:
123123
dictionary = xmltodict.parse(response_text)
124124
if &#34;C4ErrorResponse&#34; in dictionary:
125-
if dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS:
125+
if (
126+
&#34;details&#34; in dictionary[&#34;C4ErrorResponse&#34;]
127+
and dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS
128+
):
126129
exception = ERROR_DETAILS.get(dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;])
127130
raise exception(response_text)
128131
else:
@@ -131,14 +134,14 @@ <h1 class="title">Module <code>pyControl4.error_handling</code></h1>
131134
)
132135
raise exception(response_text)
133136
elif &#34;code&#34; in dictionary:
134-
if dictionary[&#34;details&#34;] in ERROR_DETAILS:
137+
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in ERROR_DETAILS:
135138
exception = ERROR_DETAILS.get(dictionary[&#34;details&#34;])
136139
raise exception(response_text)
137140
else:
138141
exception = ERROR_CODES.get(str(dictionary[&#34;code&#34;]), C4Exception)
139142
raise exception(response_text)
140143
elif &#34;error&#34; in dictionary:
141-
if dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
144+
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
142145
exception = DIRECTOR_ERROR_DETAILS.get(dictionary[&#34;details&#34;])
143146
raise exception(response_text)
144147
else:
@@ -175,7 +178,10 @@ <h2 id="parameters">Parameters</h2>
175178
elif await __checkResponseFormat(response_text) == &#34;XML&#34;:
176179
dictionary = xmltodict.parse(response_text)
177180
if &#34;C4ErrorResponse&#34; in dictionary:
178-
if dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS:
181+
if (
182+
&#34;details&#34; in dictionary[&#34;C4ErrorResponse&#34;]
183+
and dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS
184+
):
179185
exception = ERROR_DETAILS.get(dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;])
180186
raise exception(response_text)
181187
else:
@@ -184,14 +190,14 @@ <h2 id="parameters">Parameters</h2>
184190
)
185191
raise exception(response_text)
186192
elif &#34;code&#34; in dictionary:
187-
if dictionary[&#34;details&#34;] in ERROR_DETAILS:
193+
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in ERROR_DETAILS:
188194
exception = ERROR_DETAILS.get(dictionary[&#34;details&#34;])
189195
raise exception(response_text)
190196
else:
191197
exception = ERROR_CODES.get(str(dictionary[&#34;code&#34;]), C4Exception)
192198
raise exception(response_text)
193199
elif &#34;error&#34; in dictionary:
194-
if dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
200+
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
195201
exception = DIRECTOR_ERROR_DETAILS.get(dictionary[&#34;details&#34;])
196202
raise exception(response_text)
197203
else:

0 commit comments

Comments
 (0)