Re: [Quickfix-developers] problems with quickfix-1.4.1 - Java code
Brought to you by:
orenmnero
From: Joerg T. <Joe...@ma...> - 2003-04-10 17:43:14
|
> (1) trying to (java) compile an application that cracks FIX4.3 messages > (in Java) with quickfix 1.4.1 is slightly broken due to some missing > throw specifiers in the socket initiator/acceptor classes (see Socket > Acceptor, Initiator diff's below) Regarding exception names: Java has a naming standard here, and it would be nice if QuickFIX could also adhere to this standard: - Checked exceptions extend java.lang.Exception and must be specified in the throws clause. They are named XyzException. They should be used in all cases where the programmer could deal with the problem indicated, eg just retry or try some other way. - Unchecked exceptions extend java.lang.RuntimeException and can be left out of the throws clause. They normally indicate programming errors (ArrayOutOfBoundsException etc.) and the programmer is not expected to do any useful recovery. The program should terminate. - Errors extend java.lang.Error and indicate fatal runtime errors: "An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions." Examples are OutOfMemoryError, StackOverFlowError etc. It would be good if the exception naming of QuickFIX could reflect this, e.g. the ConfigError should be changed to the ConfigException, the UnsupportedMessageType to UnsupportedMessageTypeException. OK, this is a major change, but would make the API more consistent. Cheers, Jörg -- Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |