Studio:Error Object: Difference between revisions

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

Revision as of 21:43, 8 July 2008

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:

  • 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,
Integer
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,
Integer
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,
Integer
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 Values Summary

The following tables summarize the sets of error property values generated by STRIDE.

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