Fix constants errors not giving a stacktrace

This commit is contained in:
Amish Shah
2016-09-04 11:53:30 +01:00
parent 4d2bb891a9
commit 9c915d1e0a
7 changed files with 14 additions and 14 deletions

View File

@@ -142,7 +142,7 @@ class ClientDataResolver {
*/
resolvePermission(permission) {
if (typeof permission === 'string') permission = Constants.PermissionFlags[permission];
if (!permission) throw Constants.Errors.NOT_A_PERMISSION;
if (!permission) throw new Error(Constants.Errors.NOT_A_PERMISSION);
return permission;
}