[FX.php List] New FX features: My $0.02US
Brion Vibber
brion at pobox.com
Tue May 31 19:08:59 MDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chris Hansen wrote:
| Interesting idea. My biggest concern is that removing this top level of
| the array would also remove the 'errorCode' element, which I feel is
| pretty important. Of course, an FX error object would still be returned
| in the event of an internal error, and perhaps I could set up the
| behavior of this function to return an FX error object if FileMaker
| returned an error. I'd like some good feedback on this.
I've got a lot of code that looks like this:
$result = $query->FMFind();
if( FX::isError( $result ) ) {
~ // report error
}
if( $result['errorCode'] ) {
~ // report error, very slightly differently
}
// blah blah
It would be convenient to only have to handle errors once, even with the
existing return array structure.
(Compatibility might be an issue of course if you change the FMFind
behavior; when the error objects appeared for internal errors I had to
make adjustments, and when the default server version changed to fmpro7
I had to hack a bunch of my scripts to keep operating on our 5.5 server.)
- -- brion vibber (brion @ pobox.com)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCnQqqwRnhpk1wk44RAmF+AJ49tXIwXd3AUff1J1Mzjke1shOIqQCgpOl+
eQQqwQ3g8m1iQL/LMxGYqoQ=
=EFAg
-----END PGP SIGNATURE-----
More information about the FX.php_List
mailing list