Archived
This forum has been archived. Please start a new discussion on GitHub.
Glacier2::PermissionsVerifier limitation - ?
allro
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

