Re: [Quickfix-developers] RE: I have a question about QF-J
Brought to you by:
orenmnero
|
From: VP M. IT A. E. T. <ass...@gm...> - 2005-06-28 17:35:13
|
I switched to an executor in the LAN and it worked fine. You are correct
the trouble earlier was with the settings file...
The file is there. But there is only one session and that is with an extern=
al
party and it could be failing for a number of reasons.
The error (console) output did not indicate that. It misdirects to an
initiator not
being there.
We can talk about how to structure a generic Error control and communicatio=
n=20
exception hierarchy.
Consider the following three classes:
class QuickfixJErrorList
{
final String error_string[] =3D
{
"ILLEGAL ARGUMENT/INTERNAL ERROR",
"CONFIG FILE NOT READABLE",
"CONFIG NOT ACCORDING TO SPECIFICATION", // somethign simpler may be
"SESSION COULD NOT BE INITIALIZED",
};
final int base_error=3D1300;
final int error_no[] =3D {1300,1301,1302, 1303} ; // this coudl be
base_error, base_error+1, etc
static public String getErrorMessage(int code) {
return error_string[(code>base_error&&(code<(base_error+error_no.length)))?=
code:0);
}
static public String getErrorMessage(String code){
try {
return getErrorMessage(Integer.parseInt(code.trim()));
} catch(Exception e) { }
return getErrorMessage(0); =20
}
}
class QuickfixException extends Exception
{
QuickfixException (String msgCode)
{
super(QuickfixJErrorList.getErrorMessage(msg);
}
}
And we can implement the JErrorList in XML and load the DOM=20
or put it on HSQLDB or some such thing and manage it from anywhere.
instead of being static class...
I am hacking as I am writing this email.. the idea may be clearer...
I can do this..if you send me a specification what you want.
--
rk
|