1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<refentry id="cockpit-error">
<refnamediv>
<refname>cockpit.js: Errors</refname>
<refpurpose>Problem codes and messages</refpurpose>
</refnamediv>
<refsection id="cockpit-problems">
<title>Problem Codes</title>
<para>Cockpit represents problems with standardized problem string codes.</para>
<variablelist>
<varlistentry>
<term><code>"access-denied"</code></term>
<listitem><para>The user is not permitted to perform the action in question.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"authentication-failed"</code></term>
<listitem><para>User authentication failed.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"internal-error"</code></term>
<listitem><para>An unexpected internal error without further info. This should
not happen during the normal course of operations.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"no-cockpit"</code></term>
<listitem><para>The system does not have a compatible version of Cockpit installed
or installed properly.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"no-session"</code></term>
<listitem><para>Cockpit is not logged in.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"not-found"</code></term>
<listitem><para>Something specifically requested was not found, such as a file,
executable etc.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"terminated"</code></term>
<listitem><para>Something was terminated forcibly, such as a connection, process
session, etc.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"timeout"</code></term>
<listitem><para>Something timed out.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"unknown-hostkey"</code></term>
<listitem><para>The remote host had an unexpected or unknown key.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>"no-forwarding"</code></term>
<listitem><para>Could not forward authentication credentials to the remote host.</para></listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection id="cockpit-messages">
<title>cockpit.message()</title>
<programlisting>
message = cockpit.message(problem)
message = cockpit.message(exception)
</programlisting>
<para>Return a message for the <code>exception</code> or <code>problem</code> code
passed as an argument. If the argument is an object with a <code>"message"</code> property,
as is the case with most exceptions, that will be returned directly. If the argument is
an object with a <code>"problem"</code> property, then it will be used as the problem code.
An appropriate message will be returned for problem codes.</para>
</refsection>
</refentry>
|