SCE-MI Error Handling Questions and Observations

From: Bojsen, Per <bojsen@zaiqtech.com>
Date: Tue May 18 2004 - 07:53:47 PDT

Hi,

in SCE-API, if the application always uses a non-NULL SceMiEC
in any SCE-API it calls, does it then follow that the SCE-MI
error handler will never be called? I mean, is the implementation
required to ensure the error handler is never called in this
case? The may sound like a trivial question, but consider that
implementations may use callback functions such as signal handlers,
interrupt routines, etc., that may run outside of any call-chain
initiated by an SCE-API call. If those functions gets errors,
there is no non-NULL SceMiEC pointer to use for error reporting
and you are pretty much left with the error handler. But that
may be surprising to the user who might reasonably expect that
error handling is entirely in his hands in this case.

Just to confirm, but I assume there is nothing wrong with mixing
the two styles of error handling (NULL and non-NULL SceMiEC) in
the same applications, right?

In fact, using a non-NULL SceMiEC is useful when the application
wants to probe the API. For example, it can be used to check
if certain attributes exist in the parameter file or it can be
used to attempt to bind to a port that may not always exist.
This approach can be used to write more flexible application
code that can work with several hardware configurations for
example.

Per
Received on Tue May 18 07:53:50 2004

This archive was generated by hypermail 2.1.8 : Tue May 18 2004 - 07:53:51 PDT