PDA

View Full Version : Flex error codes



cummins
08-04-2009, 03:18 PM
I'm creating a library to wrap some of the more common FlexNet functionality using the Activation API. Now I noticed that for the FlxActError struct you're using error codes (major error no.) with a base of 50000 for your errors.

I'd like to reuse the same struct to add some of our own custom error codes and was thinking of picking a major error no. for that and then using the minorErrorNo to represent my own errors

is there a particular value/range you recommend? I know its a 32-bit no. but are there possibilities of any future error codes getting added and if so what range would they most likely use?
in other words is there anything I need to take into consideration or can I just go ahead and pick any random unused number

(btw just wondering if there was any particular reason for starting at 50000? :))

RobertDickau
08-05-2009, 12:38 PM
I don't think there's any significance to 50000 (LM_TS_BASE_ERROR), other than it's easy to distinguish from FLEXible API return codes (negative numbers) and flxActCommonLibraryInit and lc_flexinit return codes (mostly small positive numbers).

I'm not aware of any specific recommendation for custom error codes, apart from staying away from the range of predefined values (currently ending at 50049)...

cummins
08-05-2009, 12:59 PM
Is there any chance that Acresso could designate a major number for client use and define that for now and in future versions? In other words reserve a range of error codes for clients to use?

Thanks

RobertDickau
08-05-2009, 04:06 PM
That make sense---if you have a support contract, I believe you can submit an enhancement request through that channel. Otherwise, you (meaning "everyone") can vote for it as a feature request at the feedback page: http://www.acresso.com/promolanding/productfeedback.htm.