Archived
This forum has been archived. Please start a new discussion on GitHub.
Glacier2::PermissionsVerifier limitation - ?
in Help Center
Hi,
In my implementation of checkPermissions I have to return an exact reason of failure. The only way I can do it now is to serialize my reason info (that may be quite complex) into reason output string parameter and make the client de-serialize it. The process is very error-prone...
It would be more elegant to allow a custom exception derived from Glacier2::PermissionDeniedException to be thrown from checkPermissions. Currently it's impossible because all exceptions are catched by Glacier2 and replaced by Glacier2::PermissionDeniedException("internal server error").
Please advice - probably I miss something
In my implementation of checkPermissions I have to return an exact reason of failure. The only way I can do it now is to serialize my reason info (that may be quite complex) into reason output string parameter and make the client de-serialize it. The process is very error-prone...
It would be more elegant to allow a custom exception derived from Glacier2::PermissionDeniedException to be thrown from checkPermissions. Currently it's impossible because all exceptions are catched by Glacier2 and replaced by Glacier2::PermissionDeniedException("internal server error").
Please advice - probably I miss something
0
Comments
-
Hi,
Right now I'm afraid you don't really have any other options than serializing your information into the reason string. We'll consider your suggestion for a future release however.
Cheers,
Benoit.0 -
Hi Benoit,
Thank you for reply.
Hopefully it will be useful for other ICE users.0 -
+1 (vote)
~Josh (extra characters to make vBulletin happy)0