Studio:Error Object: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Error Object ==
The Error Oject is used to return rich error information from asynchronous STRIDE calls. An Error Object is instantiated by STRIDE internally and is returned from ascript.WaitForEvent() instead of (or in addition to) the expected User/Owner object.


The Error object is used to return rich error information from asynchronous STRIDE calls. An Error object is instantiated by STRIDE internally and is returned from ascript.WaitForEvent() instead of (or in addition to) the expected User/Owner object.
The Error Object can only be obtained as a result of calling WaitForEvent(). An Error Object is returned whenever an asynchonous operation has been previously invoked and subsequently fails. Asynchronous operations that can subsequently yield error events are limited to the following:
 
The error object can only be obtained as a result of calling WaitForEvent(). An Error object is returned whenever an asynchonous operation has been previously invoked and subsequently fails. Asynchronous operations that can subsequently yield error events are limited to the following:


* Function.User.CallNonBlocking() Method
* Function.User.CallNonBlocking() Method
Line 18: Line 16:
{| cellspacing="0" cellpadding="10" width="100%" border="1"
{| cellspacing="0" cellpadding="10" width="100%" border="1"
|-
|-
| width="250" bgcolor="#66ff99" | '''Member'''<br>
| width="100" bgcolor="#66ff99" | '''Member'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Code  
| Code  
| Property<br>'''Read-only''',<br>Integer
| Property<br>'''Read-only''',<br>int
| Error code corresponding to the error.
| Error code corresponding to the error.
|-
|-
Line 31: Line 29:
|-
|-
| Name  
| Name  
| Property<br>'''Read-only''',<br>Integer
| Property<br>'''Read-only''',<br>int
| Contains the name of the error source. Indicates the system that was the source of the error. This property is used to provide additional classification of an Error object. Values include:
| Contains the name of the error source. Indicates the system that was the source of the error. This property is used to provide additional classification of an Error object. Values include:
 
<br>
{| cellspacing="0" cellpadding="10" width="100%" border="1"
{| cellspacing="0" cellpadding="0" width="60%" border="0"
|-
| width="100" bgcolor="#66ff99" | '''Name value'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| "HostError" Error occurred on host
| width="10" | "HostError"  
| - Error occurred on host
|-
|-
| "TargetError" Error occurred on target
| "TargetError"  
| - Error occurred on target
|-
|-
| "SystemError"  
| "SystemError"  
| Error occurred in the STRIDE application
| - Error occurred in the STRIDE application
|}
|}


Line 53: Line 50:
|-
|-
| Type  
| Type  
| Property<br>'''Read-only''',<br>Integer
| Property<br>'''Read-only''',<br>int
| Always contains "Error". This property is present in all objects that can be returned from ascript.WaitForEvent(). The Type property is typically used to classify such an object in a script.
| Always contains "Error". This property is present in all objects that can be returned from ascript.WaitForEvent(). The Type property is typically used to classify such an object in a script.
|}
|}


<br>
'''Error Codes Summary'''
   
   
=== Error Values Summary ===
The following table summarizes the STRIDE-generated error codes along with their corresponding reasons.
The following tables summarize the sets of error property values generated by STRIDE.
 
==== Name: "HostError" ====


{| cellspacing="0" cellpadding="10" width="100%" border="1"
{| cellspacing="0" cellpadding="10" width="100%" border="1"
|-
|-
| width="250" bgcolor="#66ff99" | '''ShortDescription'''<br>
| align="right" width="10" bgcolor="#66ff99" | '''Code'''<br>
| width="100" bgcolor="#66ff99" | '''Code'''<br>
| bgcolor="#66ff99" | '''Reason'''<br>
| bgcolor="#66ff99" | '''Cause of Error'''<br>
| width="100" bgcolor="#66ff99" | '''Name'''<br>
| width="100" bgcolor="#66ff99" | '''ShortDescription'''<br>
|-
|-
| align="right" | 31
| Function called or message sent to a receiver that is not registered.
| "HostError"
| "NoLocalRegistration"  
| "NoLocalRegistration"  
| 31
| Function called or message sent to a receiver that is not registered.
|-
|-
| align="right" | 2
| PAL Memory allocation failed.
| "HostError"
| "MemoryAllocationFailure"  
| "MemoryAllocationFailure"  
| 2
| PAL Memory allocation failed.
|-
|-
| align="right" | 13
| The STRIDE message queue is full.
| "HostError"
| "MessageQueueFull"  
| "MessageQueueFull"  
| 13
| The STRIDE message queue is full.
|-
|-
| align="right" | 3
| PAL notification to STRIDE failed.
| "HostError"
| "PalNotifyRuntimeFailure"  
| "PalNotifyRuntimeFailure"  
| 3
| PAL notification to STRIDE failed.
|-
|-
| align="right" | 4
| PAL user notification failed.
| "HostError"
| "PalNotifyUserFailure"  
| "PalNotifyUserFailure"  
| 4
| PAL user notification failed.
|}
<br>
==== Name: "TargetError" ====
{| cellspacing="0" cellpadding="10" width="100%" border="1"
|-
| width="250" bgcolor="#66ff99" | '''ShortDescription'''<br>
| width="100" bgcolor="#66ff99" | '''Code'''<br>
| bgcolor="#66ff99" | '''Cause of Error'''<br>
|-
|-
| align="right" | 82
| The connection to the target was lost.
| "TargetError"
| "ConnectionLost"  
| "ConnectionLost"  
| 82
| The connection to the target was lost.
|-
|-
| align="right" | 85
| The call to the target terminated unexpectedly.
| "TargetError"
| "CallTerminated"  
| "CallTerminated"  
| 85
| The call to the target terminated unexpectedly.
|-
|-
| align="right" | 86
| The call to the target timed out.
| "TargetError"
| "CallTimedOut"  
| "CallTimedOut"  
| 86
| The call to the target timed out.
|}
<br>
==== Name: "SystemError" ====
{| cellspacing="0" cellpadding="10" width="100%" border="1"
|-
| width="250" bgcolor="#66ff99" | '''ShortDescription'''<br>
| width="100" bgcolor="#66ff99" | '''Code'''<br>
| bgcolor="#66ff99" | '''Cause of Error'''<br>
|-
|-
| align="right" | -1
| An unexpected error occurred.
| "SystemError"
| "SystemError"  
| "SystemError"  
| -1
| An unexpected STRIDE Studio error occurred.
|}
|}
[[Category:Studio:AutoScript]]

Latest revision as of 16:04, 21 August 2009

The Error Oject is used to return rich error information from asynchronous STRIDE calls. An Error Object is instantiated by STRIDE internally and is returned from ascript.WaitForEvent() instead of (or in addition to) the expected User/Owner object.

The Error Object can only be obtained as a result of calling WaitForEvent(). An Error Object is returned whenever an asynchonous operation has been previously invoked and subsequently fails. Asynchronous operations that can subsequently yield error events are limited to the following:

  • Function.User.CallNonBlocking() Method
  • Function.User.CallBypassOverrideNonBlocking() Method
  • Message.User.SendCmd() Method
  • Message.User.SendCmdBypassOverride() Method
  • Message.Owner.SendRsp() Method


Member
Type
Description
Code Property
Read-only,
int
Error code corresponding to the error.
Description Property
Read-only,
String
Description of the error suitable for display to the user or to write to a log file.
Name Property
Read-only,
int
Contains the name of the error source. Indicates the system that was the source of the error. This property is used to provide additional classification of an Error object. Values include:


"HostError" - Error occurred on host
"TargetError" - Error occurred on target
"SystemError" - Error occurred in the STRIDE application
ShortDescription Property
Read-only,
String
Contains a canonical string of each error code (redundant to the error code). The string representation can be compared and/or switched on in a script to take specific actions.
Type Property
Read-only,
int
Always contains "Error". This property is present in all objects that can be returned from ascript.WaitForEvent(). The Type property is typically used to classify such an object in a script.


Error Codes Summary

The following table summarizes the STRIDE-generated error codes along with their corresponding reasons.

Code
Reason
Name
ShortDescription
31 Function called or message sent to a receiver that is not registered. "HostError" "NoLocalRegistration"
2 PAL Memory allocation failed. "HostError" "MemoryAllocationFailure"
13 The STRIDE message queue is full. "HostError" "MessageQueueFull"
3 PAL notification to STRIDE failed. "HostError" "PalNotifyRuntimeFailure"
4 PAL user notification failed. "HostError" "PalNotifyUserFailure"
82 The connection to the target was lost. "TargetError" "ConnectionLost"
85 The call to the target terminated unexpectedly. "TargetError" "CallTerminated"
86 The call to the target timed out. "TargetError" "CallTimedOut"
-1 An unexpected error occurred. "SystemError" "SystemError"