Nintendo 3DS Miiverse Library  1.3.2
(OLV/Olive)
Information on Error Handling

Overview

This document describes error handling in the Miiverse (OLV/Olive) library.

A variety of errors can occur with the Miiverse library API functions, even in retail products, due to factors such as the Parental Controls settings or Internet communication errors that occur at unspecified times. If your application supports the Miiverse library, design it to handle any errors that may be returned by Miiverse API functions. Error codes corresponding to the errors returned by the Miiverse library API functions are available to display in the Error/EULA display applet, which you can use to prompt a response from the user.

Error Handling

Guidelines for error handling in the Miiverse library are shown below in the form of simplified C++ code.

nn::olv::Result olvResult = nn::olv::Initialize(&initializedData, &initializeParam);
{
// Show errors with the Error/EULA display applet.
olvErrorCode = nn::olv::GetErrorCode(olvResult);
// Set so the OLV library is not used after this point.
olvDisable = true;
}
else if (olvResult <= nn::olv::ResultLibraryTemporaryError() ||
olvResult <= nn::olv::ResultNetworkError() ||
{
// Show errors with the Error/EULA display applet.
olvErrorCode = nn::olv::GetErrorCode(olvResult);
// If possible, make it so the user input can be tried again.
}
else if (olvResult <= nn::olv::ResultFatalError() ||
olvResult <= nn::olv::ResultUsageError())
{
// Show errors with the Error/EULA display applet.
olvErrorCode = nn::olv::GetErrorCode(olvResult);
// Make this so it is removed in debugging and ignored in the product version.
NN_ASSERTMSG(0, "Error: %u", nn::olv::GetErrorCode(olvResult));
}
else
{
// This error does not display an error message, so ignore it.
}