CTR Pia
4.11.3
Game Communication Engine
|
This class converts nn::Result
type errors into network error codes passed to the error/EULA applet.
More...
Public Member Functions | |
void | Trace (u64 flag) const |
Prints information that is useful for debugging. More... | |
Static Public Member Functions | |
static u32 | Convert (const nn::Result &r) |
Converts Pia library Result values to network error codes. More... | |
This class converts nn::Result
type errors into network error codes passed to the error/EULA applet.
2015-04-16 Fixed a bug where ResultNexInternalError
objects could not be converted using the Convert
function after the Session::Cleanup
function was called, causing the library to stop on an assertion.
2014-08-07 Changed Pia so that it halts on an assertion if something other than a Result
is passed to the Convert
function.
2012-11-06 Replaced locations that coded non-Pia Result
values passed to Convert
as immediate values with symbol names. The actual values passed remain the same.
2012-06-21 Initial version.
Convert
function.
|
static |
Converts Pia library Result
values to network error codes.
Converts the Result
type value returned by the Pia library to a network error code.
As an exception, returns a network error code corresponding to the NEX internal error for this Result
if the ResultNexInternalError
is passed. There are several types of internal error, so the return value when passed ResultNexInternalError
can be undefined.
If ResultNexInternalError
is passed to this function when the Pia API has not yet returned ResultNexInternalError
, this function asserts. The converted values can be passed to the Error/EULA applet. If IsSuccess
is true
for the argument, 0
is returned. If an argument not defined in the Pia library is passed, Pia raises an assertion. (In release builds, it returns NN_PIA_ERROR_CODE_BASE
.) This function converts the results defined in the Pia library into unique identification codes, with the exception of ResultNexInternalError
, but it is not necessary to show all codes as errors to the user. For information about the error codes to show, For more information, see the CTR Guidelines: Internet or the network error code list.
[in] | r | Specifies the nn::Result value to convert to a network error code. |
void nn::pia::util::NetworkErrorCodeConverter::Trace | ( | u64 | flag | ) | const |
Prints information that is useful for debugging.
[in] | flag | Specifies the bitwise OR of trace flags. For more information, see the TraceFlag type. |