Correctly reference SocketlibInvalidUserError
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## In development
|
||||||
|
### Bugfixes
|
||||||
|
- When an invalid user id is specified socketlib will now throw the correct error message.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 1.0.3
|
## 1.0.3
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- `executeFor` functions will no longer fail with an exception if a function scheduled to be called by the local user throws.
|
- `executeFor` functions will no longer fail with an exception if a function scheduled to be called by the local user throws.
|
||||||
|
|||||||
@@ -100,9 +100,9 @@ class SocketlibSocket {
|
|||||||
return func(...args);
|
return func(...args);
|
||||||
const user = game.users.get(userId);
|
const user = game.users.get(userId);
|
||||||
if (!user)
|
if (!user)
|
||||||
throw new SocketlibInvalidUserError(`No user with id '${userId}' exists.`);
|
throw new errors.SocketlibInvalidUserError(`No user with id '${userId}' exists.`);
|
||||||
if (!user.active)
|
if (!user.active)
|
||||||
throw new SocketlibInvalidUserError(`User '${user.name}' (${userId}) is not connected.`);
|
throw new errors.SocketlibInvalidUserError(`User '${user.name}' (${userId}) is not connected.`);
|
||||||
return this._sendRequest(name, args, [userId]);
|
return this._sendRequest(name, args, [userId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user