# TdApi.Error (tdlight API 3.3.160 API)
declaration: package: it.tdlight.jni, class: TdApi, class: Error

Package it.tdlight.jni

# Class TdApi.Error

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Error

Enclosing class:
  TdApi

    public static class TdApi.Error
    extends TdApi.Object

An object of this type can be returned on every function call, in case of an error.

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`int` | `code` | Error code; subject to future changes.
`static int` | `CONSTRUCTOR` |
`String` | `message` | Error message; subject to future changes.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`Error()` | An object of this type can be returned on every function call, in case of an error.
`Error​(int code, String message)` | An object of this type can be returned on every function call, in case of an error.
`Error​(DataInput input)` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`boolean` | `equals​(Object o)` |
`int` | `getConstructor()` |
`int` | `hashCode()` |
`void` | `serialize​(DataOutput output)` |

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### code

public int code
Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user.

### message

public String message
Error message; subject to future changes.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### Error

public Error()
An object of this type can be returned on every function call, in case of an error.

### Error

public Error​(int code, String message)
An object of this type can be returned on every function call, in case of an error.

Parameters:
  `code` - int Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user.
  `message` - String Error message; subject to future changes.

### Error

public Error​(DataInput input) throws IOException

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize​(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals​(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`