# Interface WebSocket.ErrorHandler

Enclosing class:
  `WebSocket`

public static interface WebSocket.ErrorHandler
Handler for transport- or protocol-level errors. The connection is closed by the time this fires.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onError(WebSocket ws, Exception ex)`

- ## Method Details

  - ### onError

    void onError(WebSocket ws, Exception ex)