#include <dwc.h>
DWCError DWC_GetLastErrorEx(int *errorCode,
DWCErrorType *errorType);errorCode |
Pointer to the error code storage location. If retrieval is not required, specify NULL. |
errorType |
Pointer to location where the error processing type is stored. If retrieval is not required, specify NULL. |
Description |
Corresponding error handling type | |
DWC_ERROR_NONE | No error. | DWC_ETYPE_NO_ERROR |
DWC_ERROR_FRIENDS_SHORTAGE | Tried to begin friend-specified matchmaking without enough valid friends for the specified number. | DWC_ETYPE_LIGHT |
DWC_ERROR_NOT_FRIEND_SERVER | With server-client matchmaking, either the friends specified to the server DS are not mutual friends or the server is down. | DWC_ETYPE_LIGHT |
DWC_ERROR_SC_CONNECT_BLOCK | The server denied client connection during server-client matchmaking. | DWC_ETYPE_LIGHT |
DWC_ERROR_SERVER_FULL | The server-client matchmaking server DS has exceeded the maximum number of participants. | DWC_ETYPE_LIGHT |
DWC_ERROR_SVL_ANY | Some other error occurred while service locator information was being obtained. | DWC_ETYPE_SHOW_ERROR |
DWC_ERROR_PROF_ANY | Some other error by the Illegal String Check library. | DWC_ETYPE_SHOW_ERROR |
DWC_ERROR_GDB_ANY | GDB library error. Normally does not occur with DWC. | DWC_ETYPE_SHOW_ERROR |
DWC_ERROR_NETWORK | Other network error. | DWC_ETYPE_SHUTDOWN_FM |
DWC_ERROR_GHTTP_ANY | HTTP communications (GameSpy HTTP) error. | DWC_ETYPE_SHUTDOWN_GHTTP |
DWC_ERROR_ND_ANY | Some other error by the Download library. | DWC_ETYPE_SHUTDOWN_ND |
DWC_ERROR_AUTH_ANY | Authentication-related error. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_AUTH_OUT_OF_SERVICE | Service terminated. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_AUTH_STOP_SERVICE | Service being halted temporarily. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_AC_ANY | Error related to automatic connection. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_DISCONNECTED | Disconnected. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_ND_HTTP | Download library HTTP communications error. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_SVL_HTTP | HTTP communications error occurred while service locator information was being obtained. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_PROF_HTTP | HTTP communications error by the Illegal String Check library. | DWC_ETYPE_DISCONNECT |
DWC_ERROR_DS_MEMORY_ANY | Error related to system save data. | DWC_ETYPE_FATAL |
DWC_ERROR_FATAL | Fatal error. | DWC_ETYPE_FATAL |
Gets information about the most recent communication error. If the system enters error status, the DWC library stops accepting nearly all functions. To recover from an error status, call the DWC_ClearError function after executing the appropriate error handling process.
The error code that should be displayed when the application generates an error is returned to the buffer indicated by the pointer to the error code storage destination. Because the error code is returned as a negative value, invert the sign to make it positive before displaying it onscreen. However, if the error code is 0 or the error process type is DWC_ETYPE_LIGHT, only the game-specific display is required, and the error code does not need to be displayed.
The errorType argument stores information about the recovery process required after an error occurs and information for displaying the error code, allowing a standard error process to be created for each value.
errorCode)For more information on error codes, see the DS Network Error Code List supplied separately.
GameSpySDK-related (-60000 to -99999)
Download features-related (-31000 to -31999)
Illegal string check-related (-33000 to -33999)
Authentication server-related (-20000 to -29999)
Internet connection-related (-50000 to -59999)
Error codes related to the GameSpy SDK (the library that uses the GameSpy server features) are expressed by summing the following three values.
[Sequence in which error processing occurred] + [Type of GameSpy SDK that generated the error] + [Detailed error information].
When the FriendsMatch library is not used, errors related to the GameSpy SDK will not occur.
DWC_ECODE_SEQ_LOGIN | -60000 | Error during login processing. |
DWC_ECODE_SEQ_FRIEND |
-70000 | Error during friend management processing. |
DWC_ECODE_SEQ_MATCH |
-80000 | Error during the matchmaking process. |
DWC_ECODE_SEQ_ETC |
-90000 | Error during processing other than listed above. |
DWC_ECODE_GS_GP | -1000 | GameSpyGP error. |
DWC_ECODE_GS_PERS |
-2000 | GameSpyPersistent error. |
DWC_ECODE_GS_STATS |
-3000 | GameSpyStats error. |
DWC_ECODE_GS_QR2 |
-4000 | GameSpyQR2 error. |
DWC_ECODE_GS_SB |
-5000 | GameSpyServerBrowsing error. |
DWC_ECODE_GS_NN |
-6000 | GameSpyNatNegotiation error. |
DWC_ECODE_GS_GT2 |
-7000 | GameSpygt2 error. |
DWC_ECODE_GS_HTTP |
-8000 | GameSpyHTTP error. |
DWC_ECODE_GS_ETC |
-9000 | Other GameSpy SDK error. |
DWC_ECODE_TYPE_NETWORK | -10 | Network failure. |
DWC_ECODE_TYPE_SERVER |
-20 | GameSpy server failure. |
DWC_ECODE_TYPE_DNS |
-30 | DNS failure. |
DWC_ECODE_TYPE_DATA |
-40 | Received invalid data. |
DWC_ECODE_TYPE_SOCKET |
-50 | Socket communication error. |
DWC_ECODE_TYPE_BIND |
-60 | Socket bind error. |
DWC_ECODE_TYPE_TIMEOUT |
-70 | Timeout has occurred. |
DWC_ECODE_TYPE_PEER |
-80 | Problem with one-on-one communication. |
DWC_ECODE_TYPE_CONN_OVER |
-100 | Exceeded number of connections. |
DWC_ECODE_TYPE_STATS_AUTH |
-200 | STATS server login error. |
DWC_ECODE_TYPE_STATS_LOAD |
-210 | STATS server data load error. |
DWC_ECODE_TYPE_STATS_SAVE |
-220 | STATS server data save error. |
DWC_ECODE_TYPE_NOT_FRIEND |
-400 | The specified partner is not a mutually registered friend. |
DWC_ECODE_TYPE_OTHER |
-410 | The partner disconnected communications (usually occurs under server-client matchmaking). |
DWC_ECODE_TYPE_MUCH_FAILUR |
-420 | Failed NAT negotiation the prescribed number of times or more. |
DWC_ECODE_TYPE_SC_CL_FAIL |
-430 | Failed client connection during server-client matchmaking. |
DWC_ECODE_TYPE_FAILED_SERVER_MIGRATION |
-431 | Could not connect to a new server host after the initial server host disconnects because server migration failed or conditions did not allow server migration. |
DWC_ECODE_TYPE_FAILED_CONNECT_GROUPID |
-432 | Failed to connect by specifying the GroupID. |
DWC_ECODE_TYPE_CLOSE |
-600 | Connection close error. |
DWC_ECODE_TYPE_TRANS_HEADER |
-610 | Error which occurred when Reliable data was received in an impossible reception state. |
DWC_ECODE_TYPE_TRANS_BODY |
-620 | Error when the receive buffer has overflowed. |
DWC_ECODE_TYPE_TRANS_SEND |
-630 | Reliable send failure. |
DWC_ECODE_TYPE_TRANS_UNKNOWN_PEER |
-640 | Error during reception from unknown peer. |
DWC_ECODE_TYPE_AC_FATAL |
-700 | The error group occurring under AC during the automatic connection process. In this case, the lower order digit represents a dedicated state value. |
DWC_ECODE_TYPE_OPEN_FILE |
-800 | GameSpyHTTP file open failure. |
DWC_ECODE_TYPE_INVALID_POST |
-810 | GameSpyHTTP invalid transmission. |
DWC_ECODE_TYPE_REQ_INVALID |
-820 | GameSpyHTTP invalid file name or other invalid parameter. |
DWC_ECODE_TYPE_UNSPECIFIED |
-830 | GameSpyHTTP error whose details are unknown. |
DWC_ECODE_TYPE_BUFF_OVER |
-840 | GameSpyHTTP buffer overflow. |
DWC_ECODE_TYPE_PARSE_URL |
-850 | GameSpyHTTP URL parsing error. |
DWC_ECODE_TYPE_BAD_RESPONSE |
-860 | Error parsing the response from the GameSpyHTTP server. |
DWC_ECODE_TYPE_REJECTED |
-870 | GameSpyHTTP server rejected a request or other message. |
DWC_ECODE_TYPE_FILE_RW |
-880 | GameSpyHTTP local file read/write error. |
DWC_ECODE_TYPE_INCOMPLETE |
-890 | Incomplete GameSpyHTTP download. |
DWC_ECODE_TYPE_TO_BIG |
-900 | Unable to download because the GameSpyHTTP file size is too large. |
DWC_ECODE_TYPE_ENCRYPTION |
-910 | GameSpyHTTP encryption error. |
DWC_ECODE_TYPE_ALLOC |
-1 | Failed to allocate memory. |
DWC_ECODE_TYPE_PARAM |
-2 | Parameter error. |
DWC_ECODE_TYPE_SO_SOCKET |
-3 | GameSpygt2 socket error caused by an SO error. |
DWC_ECODE_TYPE_NOT_INIT |
-4 | The Internet connection has not been initialized. |
DWC_ECODE_TYPE_DUP_INIT |
-5 | The library has been initialized twice. |
DWC_ECODE_TYPE_WM_INIT |
-6 | Failure to initialize WM. |
DWC_ECODE_TYPE_UNEXPECTED |
-9 | An unexpected state, or an unknown GameSpy error has occurred. |
The download feature-related error codes are expressed by summing the following three values:DWC_ECODE_SEQ_ADDINS(-30000) + DWC_ECODE_FUNC_ND(-1000) + [detailed error information].
DWC_ECODE_TYPE_ND_ALLOC |
-1 | Failed to allocate memory. |
DWC_ECODE_TYPE_ND_FATAL |
-9 | Some other fatal error (not defined above) has occurred. |
DWC_ECODE_TYPE_ND_BUSY |
-10 | A function was called in a state in which it cannot be called. |
DWC_ECODE_TYPE_ND_HTTP |
-20 | HTTP communications failure. |
DWC_ECODE_TYPE_ND_BUFFULL |
-30 | Received data was larger than the allocated receive buffer. (DWC_ECODE_TYPE_ND_BUFFULL is not issued starting with the TwlDWC 5.0 official release. DWC_ECODE_TYPE_ND_FATAL is set.) |
DWC_ECODE_TYPE_ND_PARAM |
-40 | Invalid parameter was passed to the function. |
| (Undefined) | -101 | Invalid parameter (for example, the game code for connecting to the download server is in the wrong format). |
| (Undefined) | -102 | Unregistered service (the specified game code for connecting is not registered in the download server). |
| (Undefined) | -103 | Illegal token (service locator information). |
| (Undefined) | -104 | Expired token (service locator information). |
| (Undefined) | -105 | No content present. |
| (Undefined) | -106 | Attribute does not match. |
| (Undefined) | -107 | Expired content. |
| (Undefined) | -108 | Access from an access point that is not a service target. |
| (Undefined) | -109 | Cannot connect to database (problem with Download server). |
| (Undefined) | -110 | Password does not match. |
The error codes related to the illegal string check feature are expressed by summing the following three values:DWC_ECODE_SEQ_ADDINS(-30000) + DWC_ECODE_FUNC_PROF(-3000) + [detailed error information]
DWC_ECODE_TYPE_PROF_CONN |
-10 | Problem with connecting to the authentication server. |
DWC_ECODE_TYPE_PROF_PARSE |
-20 | Problem with response from the authentication server. |
DWC_ECODE_TYPE_PROF_OTHER |
-30 | An error has occurred for some other reason. |
These error codes are related to authentication server login and retrieval of service locator information.
The error codes related to connecting to the Internet are expressed by summing the following two values:
[Detailed error information] (+ [connection target type])
| -50000 | Disconnected from the access point before automatic connection to the Internet could be completed. Connection target type is 00 - 98. |
| -50099 | AP beacon could not be found. Connection target type is 99. |
| -50199 | Network initialization failed for an unknown reason. Connection target type is 99. |
| -50599 | Could not connect to Internet due to unobtained EULA consent. Connection target type is 99. |
| -50699 | Could not start connection test because the wireless feature is OFF. Connection target type is 99. |
| -51099 | Found the access point beacon, but found no SSIDs matching those of connection candidates. Connection target type is 99. |
| -51100 | Could not connect to access point because WEP key is different. Note: The status code for the authentication request is "15: Authentication rejected due to challenge failure (WEP key error)." Example for connection target type 03: PC was not set to permit connections, so it could not connect to the Nintendo Wi-Fi Connector. |
| -51200 | Could not connect to the access point because the maximum connectable number of units was exceeded. Note: The status code for the association request is "17: Connection rejected due to lack of resources at access point." |
| -51300 | For some reason, connection to the access point could not be established. |
| -52000 | DHCP failed. |
| -52100 | DNS failed (throughout the entire process of automatic connection to the Internet). |
| -52200 | Could not connect to the Internet-based server for HTTP connection tests. |
| -52300 | Failed to create account on the authentication server. (For devices that have never connected to the Wi-Fi connection before, an account is created during automatic connection to the Internet.) |
| -53000 | Could not retrieve hotspot authentication information from the authentication server. |
| -53100 | Hotspot authentication failed. |
| -53200 | Could not connect to the connection test server after hotspot authentication. |
| -54000 | Disconnected from the network during communications. (Wireless connection.) |
| -54100 | Disconnected from the network during communications. (Internet connection.) |
| -54900 | A fatal error occurred during communication. |
| 0 | The access point for connection target 1. |
| -1 | The access point for connection target 2. |
| -2 | The access point for connection target 3. |
| -3 | Nintendo Wi-Fi USB Connector. |
| -4 | Nintendo Wi-Fi Station. |
| -5 | A FREESPOT hotspot. |
| -6 | Wayport (North American hotspot) Note: Currently cannot be used. |
| -7 | (Reserved) |
| -8 | NintendoZone |
| -10 | The access point for connection target 4. |
| -11 | The access point for connection target 5. |
| -12 | The access point for connection target 6. |
errorType)When an error occurs, the error processing type (DWCErrorType) returns a value that indicates when the library should no longer be initialized.
DWC_ETYPE_NO_ERROR |
No error. |
DWC_ETYPE_LIGHT |
Only a game-specific display; error code display is not necessary. Recovery is possible by calling the DWC_ClearError function. |
DWC_ETYPE_SHOW_ERROR |
Display the error code. Recovery is possible by calling the DWC_ClearError function. |
DWC_ETYPE_SHUTDOWN_FM |
The DWC_ShutdownFriendsMatch function must be called to terminate the FriendsMatch library. Display the error code. |
DWC_ETYPE_SHUTDOWN_GHTTP |
Call the following library release functions, as needed.DWC_RnkShutdown function (General-Purpose Ranking library)Display the error code. |
DWC_ETYPE_SHUTDOWN_ND |
You must call the DWC_NdCleanupAsync function and terminate the Download library. Display the error code. |
DWC_ETYPE_DISCONNECT |
Call the following library release functions, as needed.DWC_ShutdownFriendsMatch function (FriendsMatch library) DWC_NdCleanupAsync function (Download library) DWC_RnkShutdown function (General-Purpose Ranking library).Communication must be terminated later using the DWC_CleanupInet or DWC_CleanupInetAsync function. Display the error code. |
DWC_ETYPE_FATAL |
Because this is equivalent to a FatalError, when using NITRO, you must prompt the user to turn power OFF. When using TWL, you must prompt the user to reset (return to the launcher). Display the error code. |
DWC_ClearError
DWC_ShutdownFriendsMatch
DWC_NdCleanupAsync
DWC_GetLastError
DWC_ERROR_NETWORK_LIGHT to the description of return values.For the change log before version 5.1 PR2, click here.
CONFIDENTIAL