YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.control.SnapcastException Class Reference

Every failure of the control library: a JSON-RPC error of the server, an unreadable answer, a timeout, a lost connection. More...

Inheritance diagram for de.yaacc.snapcast.control.SnapcastException:
Inheritance graph
Collaboration diagram for de.yaacc.snapcast.control.SnapcastException:
Collaboration graph

Classes

enum  Kind
 What kind of failure it is. More...
 

Public Member Functions

 SnapcastException (Kind kind, int code, String message, String data, Throwable cause)
 
Kind getKind ()
 
int getCode ()
 The JSON-RPC error code; 0 when the failure did not come from a JSON-RPC error.
 
String getData ()
 The data of the JSON-RPC error (the real reason for most errors of the server), or null.
 
boolean isUnauthorized ()
 
boolean isForbidden ()
 
boolean isAuthorizationError ()
 True when the server wants credentials (401) or refuses these (403).
 
String describe ()
 The message and the data in one line, for an error row.
 

Static Public Attributes

static final int CODE_UNAUTHORIZED = 401
 The JSON-RPC code of "unauthorized" in the Snapcast server (authorization is switched on and not given).
 
static final int CODE_FORBIDDEN = 403
 The JSON-RPC code of "forbidden" in the Snapcast server.
 

Detailed Description

Every failure of the control library: a JSON-RPC error of the server, an unreadable answer, a timeout, a lost connection.

The library throws nothing else out of its public methods for server input (a wrong argument of the caller is an IllegalArgumentException).

Member Function Documentation

◆ describe()

String de.yaacc.snapcast.control.SnapcastException.describe ( )

The message and the data in one line, for an error row.

The text comes from the server: it is display text (control characters are already replaced), never an identity and never a log line, because it can carry addresses or other identifiers of the server's network.


The documentation for this class was generated from the following file: