File: exceptions.md

package info (click to toggle)
wimsapi 0.5.11-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 564 kB
  • sloc: python: 3,096; makefile: 16
file content (33 lines) | stat: -rw-r--r-- 794 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Exceptions


## wimsapi.WimsAPIError

The base exception for all **wimsapi** exceptions.


## wimsapi.NotSavedError

Raised trying to use a method needing an object to be saved, without the object being
actually saved (e.g. deleting an unsaved [Class](class.md))


## wimsapi.InvalidItemTypeError

Raised by

* `Class.additem(object, cls)`
* `Class.delitem(object, cls)`
* `Class.getitem(object, cls)`
* `Class.checkitem(object, cls)`

if given `object` or `cls` is not a valid *WIMS* class item type
(See [Class](class.md)).


## wimsapi.AdmRawError

Raised either when sending an invalid request to the *WIMS* server (e.g. getting
a user that does not exists) or when the *WIMS* server encounter an unknown error.

The response from the *WIMS* server is usually in the exception's message.