# ~~Function: onError()~~ (/jsdoc/pixi-vn/index/namespaces/Game/functions/onError)



\> **onError**(`handler`): () => `void`

Defined in: [src/index.ts:314](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/index.ts#L314)

Parameters [#parameters]

handler [#handler]

(`type`, `error`, `props`) => `void` | `Promise`\<`void`>

Returns [#returns]

() => `void`

Deprecated [#deprecated]

Game.onError is deprecated. Use Game.addOnError / Game.removeOnError to register multiple handlers.
