Hi again,
I developped a guiservice in Geonetwork 2.0.3 in order to manage Users/Groups session linked with a centralized authenticated server and a LDAP server.
I would like to add an exception when the user is not belonging to a non-authorized group.
The problem is that my exception is not displayed by the GUI, it only displayed in logs.
Is there a way to add an exception into a guiservice ?
I tried something like :
if (myCondition) {
// throw new GeoNetException(" My exception ", GeoNetException.LOGIN);
// throw new IllegalArgumentException(" My exception.... ");
// throw new Exception(" My exception.....");
}
but it's not successful at all !
Regards
--
Mathieu COUDERT
Hi Mathieu,
gui services provide pieces of the user interface and their exceptions are
ignored to make the application more robust.
You could consider 2 alternatives:
- use a standard service, maybe adding the information now returned by
the gui service
- into the gui service, return an 'error' element and use that within the
stylesheet.
Cheers,
Andrea
Hi again,
I developped a guiservice in Geonetwork 2.0.3 in order to manage
Users/Groups session linked with a centralized authenticated server and
a LDAP server.
I would like to add an exception when the user is not belonging to a
non-authorized group.
The problem is that my exception is not displayed by the GUI, it only
displayed in logs.
Is there a way to add an exception into a guiservice ?
I tried something like :
if (myCondition) {
// throw new GeoNetException(" My exception ",
GeoNetException.LOGIN);
// throw new IllegalArgumentException(" My exception.... ");
// throw new Exception(" My exception.....");
}
but it's not successful at all !
Regards