NWC24GetErrorCode

C Specification

#include <revolution/nwc24.h>
s32 NWC24GetErrorCode( void );

Description

Returns a WiiConnect24 system error code (a 6-digit numeric value). Values are given as negative numbers.

Currently, this error code is set when there is a problem running one of the following functions:

NWC24OpenLib
NWC24Check
NWC24CommitMsg
NWC24ExecDownloadTask

When an error message relating to WiiiConnect24 is displayed, this six-digit error code must be included in what is displayed on the screen. (Be sure to reverse the sign during onscreen display.)

Even if the result of calling the above functions is a value other than NWC24_OK, it is not necessarily true that a 6-digit error code will have been prepared in all situations. For example, NWC24GetErrorCode will simply return zero for programming errors of which the user should not be notified, or errors that can continue.

In the event that it is necessary to display an error message when an error code has not been prepared, use the NWC24_ERRCODE_UNDEFINED (-109999) error code, which indicates a "miscellaneous error".

Arguments

None.

Return Values

A 6-digit error code (negative value).
Returns zero if there is no problem with the immediately preceding function.

See Also

NWC24OpenLib, NWC24Check, NWC24CommitMsg, NWC24ExecDownloadTask
NWC24 Error Handling Sequences

Revision History

2007/08/23 Added error handling sequence to the See Also section.
2007/08/02 Added NWC24ExecDownloadTask.
2007/07/26 Added text about situations where error codes are not prepared.
2007/04/05 Added NWC24CommitMsg.
2006/12/05 Initial version.


CONFIDENTIAL