~ubuntu-branches/ubuntu/oneiric/bugzilla/oneiric

« back to all changes in this revision

Viewing changes to docs/html/api/Bugzilla/Error.html

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2008-06-27 22:34:34 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080627223434-0ib57vstn43bb4a3
Tags: 3.0.4.1-1
* Update of French, Russian and German translations. (closes: #488251)
* Added Bulgarian and Belarusian translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<html>
3
 
  <head>
4
 
    <title>
5
 
Bugzilla::Error</title>
6
 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7
 
  <link rel="stylesheet" title="style" type="text/css" href="../style.css" media="all" >
8
 
 
9
 
</head>
10
 
  <body id="pod">
11
 
<p class="backlinktop"><b><a name="___top" href="../index.html" accesskey="1" title="All Documents">&lt;&lt;</a></b></p>
12
 
<h1>Bugzilla::Error</h1>
13
 
<div class='indexgroup'>
14
 
<ul   class='indexList indexList1'>
15
 
  <li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
16
 
  <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
17
 
  <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
18
 
  <li class='indexItem indexItem1'><a href='#FUNCTIONS'>FUNCTIONS</a>
19
 
  <li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
20
 
</ul>
21
 
</div>
22
 
 
23
 
<h1><a class='u' href='#___top' title='click to go to top of document'
24
 
name="NAME"
25
 
>NAME</a></h1>
26
 
 
27
 
<p>Bugzilla::Error - Error handling utilities for Bugzilla</p>
28
 
 
29
 
<h1><a class='u' href='#___top' title='click to go to top of document'
30
 
name="SYNOPSIS"
31
 
>SYNOPSIS</a></h1>
32
 
 
33
 
<pre  class="code">  use Bugzilla::Error;
34
 
 
35
 
  ThrowUserError(&#34;error_tag&#34;,
36
 
                 { foo =&#62; &#39;bar&#39; });</pre>
37
 
 
38
 
<h1><a class='u' href='#___top' title='click to go to top of document'
39
 
name="DESCRIPTION"
40
 
>DESCRIPTION</a></h1>
41
 
 
42
 
<p>Various places throughout the Bugzilla codebase need to report errors to the user. The <code  class="code">Throw*Error</code> family of functions allow this to be done in a generic and localizable manner.</p>
43
 
 
44
 
<p>These functions automatically unlock the database tables, if there were any locked. They will also roll back the transaction, if it is supported by the underlying DB.</p>
45
 
 
46
 
<h1><a class='u' href='#___top' title='click to go to top of document'
47
 
name="FUNCTIONS"
48
 
>FUNCTIONS</a></h1>
49
 
 
50
 
<dl>
51
 
<dt><a name="ThrowUserError"
52
 
><code  class="code">ThrowUserError</code></a></dt>
53
 
 
54
 
<dd>
55
 
<p>This function takes an error tag as the first argument, and an optional hashref of variables as a second argument. These are used by the <i>global/user-error.html.tmpl</i> template to format the error, using the passed in variables as required.</p>
56
 
 
57
 
<dt><a name="ThrowCodeError"
58
 
><code  class="code">ThrowCodeError</code></a></dt>
59
 
 
60
 
<dd>
61
 
<p>This function is used when an internal check detects an error of some sort. This usually indicates a bug in Bugzilla, although it can occur if the user manually constructs urls without correct parameters.</p>
62
 
 
63
 
<p>This function&#39;s behaviour is similar to <code  class="code">ThrowUserError</code>, except that the template used to display errors is <i>global/code-error.html.tmpl</i>. In addition if the hashref used as the optional second argument contains a key <i>variables</i> then the contents of the hashref (which is expected to be another hashref) will be displayed after the error message, as a debugging aid.</p>
64
 
 
65
 
<dt><a name="ThrowTemplateError"
66
 
><code  class="code">ThrowTemplateError</code></a></dt>
67
 
 
68
 
<dd>
69
 
<p>This function should only be called if a <code  class="code">template-&#60;gt</code>process()&#62; fails. It tries another template first, because often one template being broken or missing doesn&#39;t mean that they all are. But it falls back to a print statement as a last-ditch error.</p>
70
 
</dd>
71
 
</dl>
72
 
 
73
 
<h1><a class='u' href='#___top' title='click to go to top of document'
74
 
name="SEE_ALSO"
75
 
>SEE ALSO</a></h1>
76
 
 
77
 
<p><a href="../Bugzilla.html" class="podlinkpod"
78
 
>Bugzilla</a></p>
79
 
<p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents">&lt;&lt;</a></b></p>
80
 
 
81
 
<!-- end doc -->
82
 
 
83
 
</body></html>