Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authoreutarass2008-06-25 07:05:22 +0000
committereutarass2008-06-25 07:05:22 +0000
commit22448ad8dad9f5ef72c65700bfaf86913effb051 (patch)
tree3fca405069460163eaa4c4cb7f7c1a237dc42769 /docs
parentb975e7bbc93133f35a5bc31747e2c7e30f5c2d5d (diff)
downloadorg.eclipse.tcf-22448ad8dad9f5ef72c65700bfaf86913effb051.tar.gz
org.eclipse.tcf-22448ad8dad9f5ef72c65700bfaf86913effb051.tar.xz
org.eclipse.tcf-22448ad8dad9f5ef72c65700bfaf86913effb051.zip
Bug 232410: [tcf][api] TCF needs standard way to define agent error codes
Diffstat (limited to 'docs')
-rw-r--r--docs/TCF Service - File System.html37
-rw-r--r--docs/TCF Service - Memory.html2
-rw-r--r--docs/TCF Services.html115
3 files changed, 101 insertions, 53 deletions
diff --git a/docs/TCF Service - File System.html b/docs/TCF Service - File System.html
index dd10042bb..9ccef52aa 100644
--- a/docs/TCF Service - File System.html
+++ b/docs/TCF Service - File System.html
@@ -160,51 +160,22 @@ Tools and targets can define additional attributes. Predefined attributes are:</
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-<p>Currently, the following values are defined for error code (other values may be
+<p>Currently, the following values are defined for service specific error codes (other values may be
defined by future versions of this protocol):</p>
<dl>
- <dt><code>STATUS_OK = 0</code>
- <dd>Indicates successful completion of the operation.
-
- <dt><code>STATUS_EOF = 1</code>
+ <dt><code>EOF = 0x10001</code>
<dd>Indicates end-of-file condition; for 'read' it means that no
more data is available in the file, and for 'readdir' it
indicates that no more files are contained in the directory.
- <dt><code>STATUS_NO_SUCH_FILE = 2</code>
+ <dt><code>NO_SUCH_FILE = 0x10002</code>
<dd>This code is returned when a reference is made to a file which
should exist but doesn't.
- <dt><code>STATUS_PERMISSION_DENIED = 3</code>
+ <dt><code>PERMISSION_DENIED = 0x10003</code>
<dd>is returned when the authenticated user does not have sufficient
permissions to perform the operation.
-
- <dt><code>STATUS_FAILURE = 4</code>
- <dd>is a generic catch-all error message; it should be returned if an
- error occurs for which there is no more specific error code.
-
- <dt><code>STATUS_BAD_MESSAGE = 5</code>
- <dd>may be returned if a badly formatted packet or protocol
- incompatibility is detected.
-
- <dt><code>STATUS_NO_CONNECTION = 6</code>
- <dd>is a pseudo-error which indicates that the client has no
- connection to the server (it can only be generated locally by the
- client, and MUST NOT be returned by servers).
-
- <dt><code>STATUS_CONNECTION_LOST = 7</code>
- <dd>is a pseudo-error which indicates that the connection to the
- server has been lost (it can only be generated locally by the
- client, and MUST NOT be returned by servers).
-
- <dt><code>STATUS_OP_UNSUPPORTED = 8</code>
- <dd>indicates that an attempt was made to perform an operation which
- is not supported for the server (it may be generated locally by
- the client if e.g. the version number exchange indicates that a
- required feature is not supported by the server, or it may be
- returned by the server if the server does not implement an
- operation).
</dl>
<h2><a name='Cmds'>Commands</a></h2>
diff --git a/docs/TCF Service - Memory.html b/docs/TCF Service - Memory.html
index 199a474eb..0e93e36b0 100644
--- a/docs/TCF Service - Memory.html
+++ b/docs/TCF Service - Memory.html
@@ -43,7 +43,7 @@ in addition to error report, describes data validity on per byte basis:</p>
&rArr; <i>&lt;error address list&gt;</i> , <i>&lt;error address&gt;</i>
<i>&lt;error address&gt;</i>
- &rArr; { "addr" : <i>&lt;int: range starting address&gt;</i> , "size" : <i>&lt;int: range length in bytes&gt;</i> , "stat" : <i>&lt;int: status code&gt;</i> , "msg" : <i>&lt;error description&gt;</i> }
+ &rArr; { "addr" : <i>&lt;int: range starting address&gt;</i> , "size" : <i>&lt;int: range length in bytes&gt;</i> , "stat" : <i>&lt;int: status code&gt;</i> , "msg" : <i>&lt;object: error description&gt;</i> }
</font></b></pre>
<p>If there is no entry in error addresses array for a data byte, then status of such
diff --git a/docs/TCF Services.html b/docs/TCF Services.html
index f0a527563..8732cc374 100644
--- a/docs/TCF Services.html
+++ b/docs/TCF Services.html
@@ -67,29 +67,106 @@ using a simple variant of Backus-Naur Form. In particular:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;error report&gt;</i>
- &rArr; <i>&lt;int: error code&gt;</i> &bull; <i>&lt;error description&gt;</i>
-</font></b></pre>
-
-<p>Error code zero means success. Error description provides a short, localizable,
-human readable explanation of error.</p>
-
-<pre><b><font face="Courier New" size=2 color=#333399>
-<i>&lt;error description&gt;</i>
+ &rArr;
&rArr; null
- &rArr; <i>&lt;string&gt;</i>
- &rArr; { "format" : <i>&lt;string&gt;</i> , "params" : [ <i>&lt;params&gt;</i> ] }
-
-<i>&lt;params&gt;</i>
- &rArr; <i>&lt;value&gt;</i>
- &rArr; <i>&lt;params&gt;</i> , <i>&lt;value&gt;</i>
+ &rArr; <i>&lt;object: error description&gt;</i>
</font></b></pre>
-<p>For <b><i><font face="Courier New" size=2 color=#333399>&lt;string&gt;</font></i></b>
-and <b><i><font face="Courier New" size=2 color=#333399>&lt;value&gt;</font></i></b> encoding see
+<p>Empty or null error report means success. Error description provides error details, including
+error code and a short, localizable, human readable explanation of the error.</p>
+
+<p>Error description properties are:</p>
+<dl>
+ <dt><b><font face="Courier New" size=2 color=#333399>"Code" : <i>&lt;integer&gt;</i></font></b>
+ <dd>Error code. Can belong to one of predefined ranges:
+ <ul>
+ <li> 0x0-0xffff Standard TCF codes, includes a limited subset of POSIX errors, and OTHER error code, which
+ can be used together with "AltCode"
+ <li> 0x10000-0x1ffff Service specific codes
+ <li> 0x20000-0x2ffff Reserved codes - will never be used by the TCF standard
+ </ul>
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"Time" : <i>&lt;integer&gt;</i></font></b>
+ <dd> Error timestamp, in milliseconds since midnight, January 1, 1970 UTC
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"Service" : <i>&lt;string&gt;</i></font></b>
+ <dd> Name of the service that reported the error. Required when "Code" is service specific code.
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"Format" : <i>&lt;string&gt;</i></font></b>
+ <dd> Error description format supports separation between constant and variable parts
+ of error message ("Format" and "Params"). This is done to support localization.
+ Format string is expected to allow translation into foreign languages by means of string table lookup.
+ The format string syntax is defined in the Java language library
+ <b><font face="Courier New" size=2>java.text.MessageFormat</font></b>.
+ In order to simplify clients written in other languages, only a subset of the syntax is supported:
+ <ul>
+ <li> Supported format types: (none), number
+ <li> Supported format styles:
+ <ul>
+ <li> number: (none), "integer", "percent"
+ </ul>
+ </ul>
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"Params" : <i>&lt;array&gt;</i></font></b>
+ <dd> An array of values to be used together with "Format" to create the error message.
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"Severity" : <i>&lt;integer&gt;</i></font></b>
+ <dd> Predefined severity values:
+ <ul>
+ <li>0 - error (default)
+ <li>1 - warning
+ <li>2 - fatal
+ </ul>
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"AltCode" : <i>&lt;integer&gt;</i></font></b>
+ <dd> Alternative error code. This can be used to represent,
+ for example, OS, POSIX, or other vendor specific error codes
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"AltOrg" : <i>&lt;string&gt;</i></font></b>
+ <dd> ID of organization defining "AltCode", for example "Linux", "VxWorks", "Wind River", etc
+
+ <dt><b><font face="Courier New" size=2 color=#333399>"CausedBy" : <i>&lt;object: error description&gt;</i></font></b>
+ <dd> A nested error description. Can be used to describe a root cause of this error.
+</dl>
+
+<p>All fields except "Code" are optional.</p>
+
+<p>Standard error codes:
+<pre><code>
+ OTHER = 1
+ JSON_SYNTAX = 2
+ PROTOCOL = 3
+ BUFFER_OVERFLOW = 4
+ CHANNEL_CLOSED = 5
+ COMMAND_CANCELLED = 6
+ UNKNOWN_PEER = 7
+ BASE64 = 8
+ EOF = 9
+ ALREADY_STOPPED = 10
+ ALREADY_EXITED = 11
+ ALREADY_RUNNING = 12
+ ALREADY_ATTACHED = 13
+ IS_RUNNING = 14
+ INV_DATA_SIZE = 15
+ INV_CONTEXT = 16
+ INV_ADDRESS = 17
+ INV_EXPRESSION = 18
+ INV_FORMAT = 19
+ INV_NUMBER = 20
+ INV_DWARF = 21
+ SYM_NOT_FOUND = 22
+ UNSUPPORTED = 23
+</code></pre>
+</p>
+
+<p>Service specific error code definitions, if any, are part of service specfications.
+Standard and service specific error codes can be extended over time. A
+client that does not recognize a specific error code should treat it in the
+same way as "OTHER".</p>
+
+<p>For encoding of <b><i><font face="Courier New" size=2 color=#333399>&lt;object&gt;</font></i></b>,
+<b><i><font face="Courier New" size=2 color=#333399>&lt;string&gt;</font></i></b>, etc., see
<a href='TCF Specification.html#JSON'>JSON - Preferred Marshaling</a>.
-Error description format supports separation between constant and variable parts
-of the message ("format" and "params"). This is done to support localization. See
-Java class <b><font face="Courier New" size=2>java.text.MessageFormat</font></b> for details.</p>
<h2><a name='Services'>Services</h2>
<ul>

Back to the top