Difference between revisions of "Error Applet"

 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is the applet presented when a title displays an error message.
+
This is the applet presented when a title displays an error message. See [[AM_services#Library_Applets|Library Applets]].
See [[AM_services#Library_Applets]].
 
  
 
All errors displayed by this applet get logged and can be viewed under 'Settings' > 'Support' > 'Error History'.
 
All errors displayed by this applet get logged and can be viewed under 'Settings' > 'Support' > 'Error History'.
Line 6: Line 5:
 
On pre-5.0.0 the specified LanguageCode has to be valid, otherwise a fatal-error is thrown. With [5.0.0+] it will use en-US when the LanguageCode is invalid.
 
On pre-5.0.0 the specified LanguageCode has to be valid, otherwise a fatal-error is thrown. With [5.0.0+] it will use en-US when the LanguageCode is invalid.
  
== ErrorContext ==
+
= ErrorContext =
 +
This is "nn::err::ErrorContext". This is a 0x200-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x1 || Type
 +
|-
 +
| 0x1 || 0x7 || Padding
 +
|-
 +
| 0x8 || 0x1F4 || Data
 +
|-
 +
| 0x1FC || 0x4 || Result
 +
|}
 +
 
 +
This is used to set specific error contexts for [[Error_Report_services#SubmitContext|erpt:c]].
 +
 
 +
Depending on '''Type''', different error report fields will be attached and sent:
 +
* Type 0: None;
 +
* Type 1: [[Error_Report_services#FieldId|ServerFqdn]], [[Error_Report_services#FieldId|ServerIpAddress]], [7.0.0+] [[Error_Report_services#FieldId|ServerErrorCode]] and either [8.0.0+] [[Error_Report_services#FieldId|AkamaiReferenceId]], [13.0.0+] [[Error_Report_services#FieldId|LumenRequestId]] or [13.0.0+] [[Error_Report_services#FieldId|LlnwLlid]];
 +
* Type 2: [[Error_Report_services#FieldId|FileSystemPath]] and [[Error_Report_services#FieldId|ResultBacktrace]];
 +
* Type 3: [[Error_Report_services#FieldId|WebMediaPlayerOpenUrl]] and [[Error_Report_services#FieldId|WebMediaPlayerLastSocketErrors]];
 +
* Type 4: [5.0.0+] [[Error_Report_services#FieldId|LcsApplicationId]], [[Error_Report_services#FieldId|LcsContentMetaKeyIdList]], [[Error_Report_services#FieldId|LcsContentMetaKeyVersionList]], [[Error_Report_services#FieldId|LcsContentMetaKeyTypeList]], [[Error_Report_services#FieldId|LcsSenderFlag]], [[Error_Report_services#FieldId|LcsApplicationRequestFlag]], [[Error_Report_services#FieldId|LcsHasExFatDriverFlag]], [[Error_Report_services#FieldId|LcsIpAddress]] and  [[Error_Report_services#FieldId|ResultBacktrace]].
 +
* Type 5: [12.0.0+] [[Error_Report_services#FieldId|BrowserCertificateHostName]], [[Error_Report_services#FieldId|BrowserCertificateCommonName]] and [[Error_Report_services#FieldId|BrowserCertificateOrganizationalUnitName]].
 +
 
 +
= ErrorViewerStartupParamCommon =
 +
This is "nn::err::ErrorViewerStartupParamCommon". This is a 0x4-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x1 || [[#ErrorType|ErrorType]]
 +
|-
 +
| 0x1 || 0x1 || IsJumpEnabled
 +
|-
 +
| 0x2 || 0x2 || Reserved
 +
|}
 +
 
 +
= ErrorViewerStartupParamForApplicationError =
 +
This is "nn::err::ErrorViewerStartupParamForApplicationError". This is a 0x1014-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 +
|-
 +
| 0x5 || 0x3 || Reserved
 +
|-
 +
| 0x8 || 0x4 || [[#ApplicationErrorCodeNumber|ApplicationErrorCodeNumber]]
 +
|-
 +
| 0xC || 0x8 || [[Settings_services#LanguageCode|LanguageCode]]
 +
|-
 +
| 0x14 || 0x800 || DialogMessage (UTF-8 string)
 +
|-
 +
| 0x814 || 0x800 || FullScreenMessage (UTF-8 string, displayed when the user clicks on "Details" and when not set this disables displaying "Details")
 +
|}
 +
 
 +
[10.0.0+] [[Applet_Manager_services#GetMainAppletApplicationControlProperty|GetMainAppletApplicationControlProperty]] is now used internally by the applet, on failure the applet will throw a fatalerr. Hence, ApplicationError can't be used from non-Applications (such as LibraryApplet) anymore.
 +
 
 +
= ErrorViewerStartupParamForEula =
 +
This is "nn::err::ErrorViewerStartupParamForEula". This is a 0xC-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 +
|-
 +
| 0x5 || 0x3 || Reserved
 +
|-
 +
| 0x8 || 0x4 || [[Settings_services#RegionCode_2|RegionCode]]
 +
|}
 +
 
 +
* ErrorType = 3. Displays the EULA.
 +
 
 +
= ErrorViewerStartupParamForParentalControl =
 +
This is "nn::err::ErrorViewerStartupParamForParentalControl". This is a 0xC-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 +
|-
 +
| 0x5 || 0x3 || Reserved
 +
|-
 +
| 0x8 || 0x4 || PctlResultRestricted
 +
|}
 +
 
 +
Used where a Result error would have been displayed with ErrorType=0, for module=PCTL errors with desc 100-119. For this the applet will display the following dialog (without report logging): "This software is restricted by Parental Controls".
 +
 
 +
= ErrorViewerStartupParamForRecordedApplicationError =
 +
This is "nn::err::ErrorViewerStartupParamForRecordedApplicationError". This is a 0x820-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 +
|-
 +
| 0x5 || 0x3 || Reserved
 +
|-
 +
| 0x8 || 0x4 || [[#ApplicationErrorCodeNumber|ApplicationErrorCodeNumber]]
 +
|-
 +
| 0xC || 0x4 || Reserved
 +
|-
 +
| 0x10 || 0x8 || TimeOfOccurrence (u64 PosixTime)
 +
|-
 +
| 0x18 || 0x8 || [[NS_services#ApplicationErrorCodeCategory|ApplicationErrorCodeCategory]]
 +
|-
 +
| 0x20 || 0x800 || Message (UTF-8 string)
 +
|}
 +
 
 +
= ErrorViewerStartupParamForRecordedSystemData =
 +
This is "nn::err::ErrorViewerStartupParamForRecordedSystemData". This is a 0x18-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 +
|-
 +
| 0x5 || 0x3 || Reserved
 +
|-
 +
| 0x8 || 0x8 || [[#ErrorCode|ErrorCode]]
 +
|-
 +
| 0x10 || 0x8 || TimeOfOccurrence (u64 PosixTime)
 +
|}
 +
 
 +
The applet does not log an error report for this. Used by [[qlaunch]] for viewing previously logged errors via the "View the Error" button.
 +
 
 +
= ErrorViewerStartupParamForRecordedSystemError =
 +
This is "nn::err::ErrorViewerStartupParamForRecordedSystemError". This is a 0x818-byte struct.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x200 || ?
+
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 +
|-
 +
| 0x5 || 0x3 || Reserved
 +
|-
 +
| 0x8 || 0x8 || [[#ErrorCode|ErrorCode]]
 +
|-
 +
| 0x10 || 0x8 || TimeOfOccurrence (u64 PosixTime)
 +
|-
 +
| 0x18 || 0x800 || Message (UTF-8 string)
 
|}
 
|}
  
== ErrorCommonHeader ==
+
= ErrorViewerStartupParamForSystemData =
 +
This is "nn::err::ErrorViewerStartupParamForSystemData". This is a 0x14-byte struct.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x1 || u8 type
+
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 
|-
 
|-
| 0x1 || 0x1 || u8 unk_x1
+
| 0x4 || 0x1 || Version
 
|-
 
|-
| 0x2 || 0x3 || ?
+
| 0x5 || 0x1 || HasResultBacktrace
 
|-
 
|-
| 0x5 || 0x1 || [4.0.0+] u8 contextFlag. When set indicates that an additional storage is pushed for [[#ErrorContext]].
+
| 0x6 || 0x1 || IsErrorCode
 
|-
 
|-
| 0x6 || 0x1 || u8 resultFlag. ErrorCommonArg: When clear, ErrorCode is used, otherwise the applet generates the error-code from res.
+
| 0x7 || 0x1 || [4.0.0+] HasErrorContext ([1.0.0-3.0.2] Reserved)
 
|-
 
|-
| 0x7 || 0x1 || ?
+
| 0x8 || 0x8 || [[#ErrorCode|ErrorCode]]
 +
|-
 +
| 0x10 || 0x4 || Result
 
|}
 
|}
  
== ErrorCommonArg ==
+
ShowError: ErrorType=0, IsJumpEnabled={varies}, HasErrorContext={set when ErrorContext used}.
 +
* If the input Result is 0xC8A2, the applet will display a special dialog regarding the current application requiring a software update, with buttons "Later" and "Restart". The official user-process name for this is <code>ShowUnacceptableApplicationVersionError</code>.
 +
* [3.0.0+] There's also special dialog handling for Result 0xCAA2. The official user-process name for this is <code>ShowUnacceptableAddOnContentVersionError</code>.
 +
 
 +
= ErrorViewerStartupParamForSystemError =
 +
This is "nn::err::ErrorViewerStartupParamForSystemError". This is a 0x1018-byte struct.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8 || ErrorCommonHeader
+
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 +
|-
 +
| 0x5 || 0x1 || [4.0.0+] HasErrorContext ([1.0.0-3.0.2] Reserved)
 
|-
 
|-
| 0x8 || 0x8 || [[#ErrorCode]]
+
| 0x6 || 0x2 || Reserved
 
|-
 
|-
| 0x10 || 0x4 || Result res
+
| 0x8 || 0x8 || [[#ErrorCode|ErrorCode]]
 +
|-
 +
| 0x10 || 0x8 || [[Settings_services#LanguageCode|LanguageCode]]
 +
|-
 +
| 0x18 || 0x800 || DialogMessage (UTF-8 string)
 +
|-
 +
| 0x818 || 0x800 || FullScreenMessage (UTF-8 string, displayed when the user clicks on "Details" and when not set this disables displaying "Details")
 
|}
 
|}
  
== SystemErrorArg ==
+
= ErrorViewerStartupParamForSystemUpdateEula =
 +
This is "nn::err::ErrorViewerStartupParamForSystemUpdateEula". This is a 0xC-byte struct.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8 || ErrorCommonHeader. type=1.
+
| 0x0 || 0x4 || [[#ErrorViewerStartupParamCommon|Common]]
 +
|-
 +
| 0x4 || 0x1 || Version
 
|-
 
|-
| 0x8 || 0x8 || [[#ErrorCode]]
+
| 0x5 || 0x3 || Reserved
 +
|-
 +
| 0x8 || 0x4 || [[Settings_services#RegionCode_2|RegionCode]]
 +
|}
 +
 
 +
* ErrorType = 8. Displays the system-update EULA. Uses an additional IStorage containing [[#EulaData|EulaData]], from [[Applet_Manager_services#CreateTransferMemoryStorage]] with flag=false.
 +
 
 +
= ErrorViewerReturnValue =
 +
This is "nn::err::ErrorViewerReturnValue". This is a 0x2-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x10 || 0x8 || [[Settings_services|LanguageCode]]
+
! Offset || Size || Description
 
|-
 
|-
| 0x18 || 0x800 || UTF-8 string dialogMessage
+
| 0x0 || 0x1 || Version
 
|-
 
|-
| 0x818 || 0x800 || UTF-8 string fullscreenMessage, displayed when the user clicks on "Details". When not set this disables displaying Details.
+
| 0x1 || 0x1 || [[#ErrorViewerJumpDestination|Destination]]
 
|}
 
|}
  
This struct is 0x1018-bytes.
+
= ApplicationErrorArg =
 +
This is "nn::err::ApplicationErrorArg". This is a 0x1014-byte struct.
  
== ApplicationErrorArg ==
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8 || ErrorCommonHeader. type=2 and unk_x1=1.
+
| 0x0 || 0x1014 || [[#ErrorViewerStartupParamForApplicationError|StartupParam]]
 +
|}
 +
 
 +
= SystemErrorArg =
 +
This is "nn::err::SystemErrorArg". This is a 0x1028-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x8 || 0x4 || u32 errorNumber. Raw decimal error number which is displayed in the dialog.
+
! Offset || Size || Description
 
|-
 
|-
| 0xC || 0x8 || [[Settings_services|LanguageCode]]
+
| 0x0 || 0x1018 || [[#ErrorViewerStartupParamForSystemError|StartupParam]]
 
|-
 
|-
| 0x14 || 0x800 || UTF-8 string dialogMessage
+
| 0x1018 || 0x9 || [4.0.0+] ServerCode
 
|-
 
|-
| 0x814 || 0x800 || UTF-8 string fullscreenMessage, displayed when the user clicks on "Details". When not set this disables displaying Details.
+
| 0x1021 || 0x7 || [4.0.0+] Reserved
 
|}
 
|}
  
This struct is 0x1014-bytes.
+
= ErrorType =
 +
This is "nn::err::ErrorType".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || SystemData
 +
|-
 +
| 1 || SystemError
 +
|-
 +
| 2 || ApplicationError
 +
|-
 +
| 3 || Eula
 +
|-
 +
| 4 || ParentalControl
 +
|-
 +
| 5 || RecordedSystemData
 +
|-
 +
| 6 || RecordedSystemError
 +
|-
 +
| 7 || RecordedApplicationError
 +
|-
 +
| 8 || SystemUpdateEula
 +
|}
 +
 
 +
= ErrorViewerJumpDestination =
 +
This is "nn::err::ErrorViewerJumpDestination".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || Nowhere
 +
|-
 +
| 1 || Set_SystemUpdate
 +
|-
 +
| 2 || Set_DataManagement
 +
|-
 +
| 3 || Set_InternetSetting
 +
|-
 +
| 4 || Cabinet_NfpDataSetting
 +
|}
 +
 
 +
= ErrorCode =
 +
This is "nn::err::ErrorCode". This is an u64.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#ErrorCodeCategory|Category]]
 +
|-
 +
| 0x4 || 0x4 || [[#ErrorCodeNumber|Number]]
 +
|}
 +
 
 +
= ErrorCodeCategory =
 +
This is "nn::err::ErrorCodeCategory". This is an u32.
 +
 
 +
= ErrorCodeNumber =
 +
This is "nn::err::ErrorCodeNumber". This is an u32.
 +
 
 +
= ApplicationErrorCodeNumber =
 +
This is "nn::err::ApplicationErrorCodeNumber". This is an u32.
 +
 
 +
= EulaData =
 +
This is "nn::err::EulaData". This is a 0x20000-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || DataCount
 +
|-
 +
| 0x4 || 0x3C || Reserved
 +
|-
 +
| 0x40 || 0x4 || [[Settings_services#Language|Language]]
 +
|-
 +
| 0x44 || 0x4 || Reserved
 +
|-
 +
| 0x48 || 0x8 || Size
 +
|-
 +
| 0x50 || 0x1FFB0 || Body
 +
|}
  
== ErrorCode ==
+
= ResultBacktrace =
This is an u64 containing the [[Error_codes|error-code]]: the low u32 is the module portion which is normally set to <code>module + 2000</code>, and the high u32 is the error description.
+
This is "nn::err::ResultBacktrace". This is a 0x84-byte struct.
  
== ResultBacktrace ==
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x4 || s32 total entries
+
| 0x0 || 0x4 || Count
 
|-
 
|-
| 0x4 || 0x4*total_entries || Array of Result
+
| 0x4 || 0x4 * 32 || Array of Result
 
|}
 
|}
  
== Usage ==  
+
= Usage =
 
User-processes should push a common arguments struct (version=0) as well as the Arg struct. Once the applet finishes running successfully, it may return an output storage in some cases. An u8 status value is located at +1, where non-zero indicates error.
 
User-processes should push a common arguments struct (version=0) as well as the Arg struct. Once the applet finishes running successfully, it may return an output storage in some cases. An u8 status value is located at +1, where non-zero indicates error.
  
 
[[Category:Library Applets]]
 
[[Category:Library Applets]]

Latest revision as of 21:02, 2 March 2023

This is the applet presented when a title displays an error message. See Library Applets.

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

On pre-5.0.0 the specified LanguageCode has to be valid, otherwise a fatal-error is thrown. With [5.0.0+] it will use en-US when the LanguageCode is invalid.

ErrorContext

This is "nn::err::ErrorContext". This is a 0x200-byte struct.

Offset Size Description
0x0 0x1 Type
0x1 0x7 Padding
0x8 0x1F4 Data
0x1FC 0x4 Result

This is used to set specific error contexts for erpt:c.

Depending on Type, different error report fields will be attached and sent:

ErrorViewerStartupParamCommon

This is "nn::err::ErrorViewerStartupParamCommon". This is a 0x4-byte struct.

Offset Size Description
0x0 0x1 ErrorType
0x1 0x1 IsJumpEnabled
0x2 0x2 Reserved

ErrorViewerStartupParamForApplicationError

This is "nn::err::ErrorViewerStartupParamForApplicationError". This is a 0x1014-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x3 Reserved
0x8 0x4 ApplicationErrorCodeNumber
0xC 0x8 LanguageCode
0x14 0x800 DialogMessage (UTF-8 string)
0x814 0x800 FullScreenMessage (UTF-8 string, displayed when the user clicks on "Details" and when not set this disables displaying "Details")

[10.0.0+] GetMainAppletApplicationControlProperty is now used internally by the applet, on failure the applet will throw a fatalerr. Hence, ApplicationError can't be used from non-Applications (such as LibraryApplet) anymore.

ErrorViewerStartupParamForEula

This is "nn::err::ErrorViewerStartupParamForEula". This is a 0xC-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x3 Reserved
0x8 0x4 RegionCode
  • ErrorType = 3. Displays the EULA.

ErrorViewerStartupParamForParentalControl

This is "nn::err::ErrorViewerStartupParamForParentalControl". This is a 0xC-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x3 Reserved
0x8 0x4 PctlResultRestricted

Used where a Result error would have been displayed with ErrorType=0, for module=PCTL errors with desc 100-119. For this the applet will display the following dialog (without report logging): "This software is restricted by Parental Controls".

ErrorViewerStartupParamForRecordedApplicationError

This is "nn::err::ErrorViewerStartupParamForRecordedApplicationError". This is a 0x820-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x3 Reserved
0x8 0x4 ApplicationErrorCodeNumber
0xC 0x4 Reserved
0x10 0x8 TimeOfOccurrence (u64 PosixTime)
0x18 0x8 ApplicationErrorCodeCategory
0x20 0x800 Message (UTF-8 string)

ErrorViewerStartupParamForRecordedSystemData

This is "nn::err::ErrorViewerStartupParamForRecordedSystemData". This is a 0x18-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x3 Reserved
0x8 0x8 ErrorCode
0x10 0x8 TimeOfOccurrence (u64 PosixTime)

The applet does not log an error report for this. Used by qlaunch for viewing previously logged errors via the "View the Error" button.

ErrorViewerStartupParamForRecordedSystemError

This is "nn::err::ErrorViewerStartupParamForRecordedSystemError". This is a 0x818-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x3 Reserved
0x8 0x8 ErrorCode
0x10 0x8 TimeOfOccurrence (u64 PosixTime)
0x18 0x800 Message (UTF-8 string)

ErrorViewerStartupParamForSystemData

This is "nn::err::ErrorViewerStartupParamForSystemData". This is a 0x14-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x1 HasResultBacktrace
0x6 0x1 IsErrorCode
0x7 0x1 [4.0.0+] HasErrorContext ([1.0.0-3.0.2] Reserved)
0x8 0x8 ErrorCode
0x10 0x4 Result

ShowError: ErrorType=0, IsJumpEnabled={varies}, HasErrorContext={set when ErrorContext used}.

  • If the input Result is 0xC8A2, the applet will display a special dialog regarding the current application requiring a software update, with buttons "Later" and "Restart". The official user-process name for this is ShowUnacceptableApplicationVersionError.
  • [3.0.0+] There's also special dialog handling for Result 0xCAA2. The official user-process name for this is ShowUnacceptableAddOnContentVersionError.

ErrorViewerStartupParamForSystemError

This is "nn::err::ErrorViewerStartupParamForSystemError". This is a 0x1018-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x1 [4.0.0+] HasErrorContext ([1.0.0-3.0.2] Reserved)
0x6 0x2 Reserved
0x8 0x8 ErrorCode
0x10 0x8 LanguageCode
0x18 0x800 DialogMessage (UTF-8 string)
0x818 0x800 FullScreenMessage (UTF-8 string, displayed when the user clicks on "Details" and when not set this disables displaying "Details")

ErrorViewerStartupParamForSystemUpdateEula

This is "nn::err::ErrorViewerStartupParamForSystemUpdateEula". This is a 0xC-byte struct.

Offset Size Description
0x0 0x4 Common
0x4 0x1 Version
0x5 0x3 Reserved
0x8 0x4 RegionCode

ErrorViewerReturnValue

This is "nn::err::ErrorViewerReturnValue". This is a 0x2-byte struct.

Offset Size Description
0x0 0x1 Version
0x1 0x1 Destination

ApplicationErrorArg

This is "nn::err::ApplicationErrorArg". This is a 0x1014-byte struct.

Offset Size Description
0x0 0x1014 StartupParam

SystemErrorArg

This is "nn::err::SystemErrorArg". This is a 0x1028-byte struct.

Offset Size Description
0x0 0x1018 StartupParam
0x1018 0x9 [4.0.0+] ServerCode
0x1021 0x7 [4.0.0+] Reserved

ErrorType

This is "nn::err::ErrorType".

Value Description
0 SystemData
1 SystemError
2 ApplicationError
3 Eula
4 ParentalControl
5 RecordedSystemData
6 RecordedSystemError
7 RecordedApplicationError
8 SystemUpdateEula

ErrorViewerJumpDestination

This is "nn::err::ErrorViewerJumpDestination".

Value Description
0 Nowhere
1 Set_SystemUpdate
2 Set_DataManagement
3 Set_InternetSetting
4 Cabinet_NfpDataSetting

ErrorCode

This is "nn::err::ErrorCode". This is an u64.

Offset Size Description
0x0 0x4 Category
0x4 0x4 Number

ErrorCodeCategory

This is "nn::err::ErrorCodeCategory". This is an u32.

ErrorCodeNumber

This is "nn::err::ErrorCodeNumber". This is an u32.

ApplicationErrorCodeNumber

This is "nn::err::ApplicationErrorCodeNumber". This is an u32.

EulaData

This is "nn::err::EulaData". This is a 0x20000-byte struct.

Offset Size Description
0x0 0x4 DataCount
0x4 0x3C Reserved
0x40 0x4 Language
0x44 0x4 Reserved
0x48 0x8 Size
0x50 0x1FFB0 Body

ResultBacktrace

This is "nn::err::ResultBacktrace". This is a 0x84-byte struct.

Offset Size Description
0x0 0x4 Count
0x4 0x4 * 32 Array of Result

Usage

User-processes should push a common arguments struct (version=0) as well as the Arg struct. Once the applet finishes running successfully, it may return an output storage in some cases. An u8 status value is located at +1, where non-zero indicates error.