cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mguthrie66
Level 2

Throw Exceptions from Fulfillment ID Generator

Hi all,
We are overriding the fulfillment id generator to do some validation at the time of licensing. We chose to do it here because all the components we need are available. The problem with this is that if the validation fails there is no way (that I know of) to throw an exception that the user will see. The implemented methods do not allow throwing of anything. I have tried using PRDBaseRuntimeException and RuntimeException, but neither work. I just get an Unknown Error. Can someone help?
Thanks,
Mike Guthrie
Emulex Corporation
0 Kudos
(2) Replies
peter_cameron
Level 2

Hi Mike,

Using the id generator as a validator isn't really the premise of the API - hence the lack of declared exceptions.
However, if there's no alternative, you could consider extending the (abstract )FLEXnetBaseRuntimeException class. As this is then an unchecked exception you can throw it from your generator. FLEXnet will then propogate the exception to the front-end.

public class MyValidationException extends FLEXnetRuntimeException {
//....
}


Hope this helps.

Peter Cameron.
0 Kudos
mguthrie66
Level 2

Hi Peter,
Thanks for your response. I had figured it out by placing a property/value pair in PublisherDefinedAttributesText_en.properties and using a PRDBaseRuntimeException.
Thanks,
Mike
0 Kudos