Throw specific exceptions

Use 3 different exceptions for configuration, network and
server errors.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>