mirror of
https://github.com/danbulant/discord.js
synced 2026-06-18 22:21:17 +00:00
Add a short comment to constructErrorCallback
This commit is contained in:
parent
415260d028
commit
a0995c6fe7
1 changed files with 3 additions and 0 deletions
|
|
@ -4,6 +4,9 @@ import InternalClient from "./InternalClient";
|
|||
import EventEmitter from "events";
|
||||
import PMChannel from "../Structures/PMChannel";
|
||||
|
||||
// This utility function creates an anonymous error handling wrapper function
|
||||
// for a given callback. It is used to allow error handling inside the callback
|
||||
// and using other means.
|
||||
function constructErrorCallback(callback) {
|
||||
return error => {
|
||||
callback(error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue