File: errors.md

package info (click to toggle)
pycangjie 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,440 kB
  • ctags: 214
  • sloc: sh: 11,238; makefile: 91; python: 89
file content (29 lines) | stat: -rw-r--r-- 797 bytes parent folder | download | duplicates (5)
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
---
layout: default
title: pycangjie documentation - Exceptions
name: projects
project: pycangjie
sub: doc
---

## Exceptions

pycangjie defines a set of exceptions mapping to the error codes returned by
the libcangjie functions.

Functions which are supposed to get you a list of characters will raise
`CangjieNoCharsError` when no characters correspond to your query.

If the libcangjie database could not be opened for some reason, then
`CangjieDBOpenError` is raised.

If an error happens when querying the database, the method will raise
`CangjieDBError`.

When memory could not be allocated, the method will raise
`CangjieMemoryError`.

Finally, methods will raise `CangjieInvalidInputError` when they are passed
an invalid input.

All exceptions are defined in the `cangjie.errors` module.