Error Applet

From Nintendo Switch Brew
Revision as of 22:50, 26 February 2019 by StuntHacks (talk | contribs) (Added information about error logging)
Jump to navigation Jump to search

This is the applet presented when a title displays an error message. See AM_services#Library_Applets. The error applet expects two IStorage inputs and no output.

All errors displayed by this applet get logged and can be viewed under 'Settings' > 'Support' > 'Error History'.

ErrorConfig

This has size 0x1018 and contains the error code, a short description of the error and a more detailed description of the error, displayed when the user clicks on "Details". Typically, all unused values can be set to zero. The first byte should be set to 1 if a custom error message is to be displayed. Otherwise, a default error message will be shown.

The error code is stored at offsets 0x8, containing the first part of the code, and 0xC, containing the second part of the code. Those values are expected to be u32's.

The short description of the error is stored as a char* at offset 0x18, the long description of the error is stored as a char* at offset 0x818.

Usage

User-processes should push a common arguments struct as well as the typical ErrorConfig struct. Since the error applet doesn't have any output, user-processes can then directly join the applet and wait for it to finish.