Changes

1,782 bytes added ,  14:25, 11 January 2019
Add ApplicationError and ShowErrorRecord
Line 6: Line 6:     
== Error applet types ==
 
== Error applet types ==
 +
 +
=== Common ===
 +
 +
For all of the following structures, the first two bytes are common and identify mode.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Typical Value || Notes
 +
|-
 +
| 0x0 || 1 || 0 || Error Applet Mode
 +
|-
 +
| 0x1 || 1 || 1 || Whether or not to use 'jump' mode
 +
|}
 +
 +
In SDK, the jump mode byte is always one, except for nn::err::ShowErrorWithoutJump. HW-Testing has shown this to have no visual impact on error applet.
    
=== Error (common one) ===
 
=== Error (common one) ===
    
Takes a CommonArgs storage with version 0.
 
Takes a CommonArgs storage with version 0.
 +
Uses a mode byte of 0 in the above struct.
    
==== Custom storage ====
 
==== Custom storage ====
Line 29: Line 45:     
Takes a CommonArgs storage with version 0.
 
Takes a CommonArgs storage with version 0.
 +
Uses a mode byte of 1 in the above struct.
    
==== Custom storage ====
 
==== Custom storage ====
Line 55: Line 72:  
=== ApplicationError ===
 
=== ApplicationError ===
   −
Apparently similar to SystemError, has type (byte 0 of the second storage) 258, with almost same offsets.
+
Allows an application to show a custom-defined error text.
 +
Uses a mode byte of 2 in the above struct.
 +
 
 +
The SDK uses size 4116 (0x1014) for this storage.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Typical Value || Notes
 +
|-
 +
| 0x8 || 4 (u32) || 0 (0000-0000) || ErrorCode of the error to use.
 +
|-
 +
| 0xC || 8 (u64) || 'en-US\0' || The Language of the following text. This uses the same language names as settings service.
 +
|-
 +
| 0x14 || 0x800 || - || String of the text to be shown as a short description of the error.
 +
|-
 +
| 0x814 || 0x800 || - || String of the text to be shown as a more detailed description of the error.
 +
|}
 +
 
 +
On hardware, the short description will be displayed initially in a dialog box with the error code. There is a details button that when clicked will display the detailed description.
 +
 
 +
=== ShowErrorRecord (ShowError with Timestamp) ===
 +
 
 +
Uses common arguments version 0 and a mode byte of 5.
 +
 
 +
Performs the same function as ShowError, but also displays the date and time of error.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Typical Value || Notes
 +
|-
 +
| 0x8 || 8 (u64) || 0 (0000-0000) || Result code to use. This is formatted with the first u32 = description and second u32 = module + 2000.
 +
|-
 +
| 0x10 || 8 (u64) || 0 (Jan 1, 1970 00:00:00 AM) || POSIX time of the error to be displayed (as seconds since epoch).
 +
|}
   −
More info needs to be added about this type.
+
Unlike ShowError, this is fullscreen and not a dialog.