passenger 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (108) hide show
  1. data/Rakefile +1 -1
  2. data/doc/Users guide.html +1 -1
  3. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +1 -1
  4. data/doc/cxxapi/ApplicationPool_8h-source.html +1 -1
  5. data/doc/cxxapi/Application_8h-source.html +1 -1
  6. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  7. data/doc/cxxapi/Configuration_8h-source.html +2 -2
  8. data/doc/cxxapi/DummySpawnManager_8h-source.html +1 -1
  9. data/doc/cxxapi/Exceptions_8h-source.html +198 -197
  10. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  11. data/doc/cxxapi/Logging_8h-source.html +1 -1
  12. data/doc/cxxapi/MessageChannel_8h-source.html +1 -1
  13. data/doc/cxxapi/SpawnManager_8h-source.html +1 -1
  14. data/doc/cxxapi/StandardApplicationPool_8h-source.html +1 -1
  15. data/doc/cxxapi/System_8h-source.html +1 -1
  16. data/doc/cxxapi/Utils_8h-source.html +1 -1
  17. data/doc/cxxapi/annotated.html +1 -1
  18. data/doc/cxxapi/classClient-members.html +1 -1
  19. data/doc/cxxapi/classClient.html +1 -1
  20. data/doc/cxxapi/classDirectoryMapper-members.html +1 -1
  21. data/doc/cxxapi/classDirectoryMapper.html +1 -1
  22. data/doc/cxxapi/classHooks-members.html +1 -1
  23. data/doc/cxxapi/classHooks.html +1 -1
  24. data/doc/cxxapi/classPassenger_1_1Application-members.html +1 -1
  25. data/doc/cxxapi/classPassenger_1_1Application.html +1 -1
  26. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +1 -1
  27. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +1 -1
  28. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +1 -1
  29. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +1 -1
  30. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +1 -1
  31. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +1 -1
  32. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +1 -1
  33. data/doc/cxxapi/classPassenger_1_1BusyException.html +1 -1
  34. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +1 -1
  35. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +1 -1
  36. data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +1 -1
  37. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +1 -1
  38. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +1 -1
  39. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +1 -1
  40. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +1 -1
  41. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +1 -1
  42. data/doc/cxxapi/classPassenger_1_1IOException-members.html +1 -1
  43. data/doc/cxxapi/classPassenger_1_1IOException.html +1 -1
  44. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +1 -1
  45. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +1 -1
  46. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +1 -1
  47. data/doc/cxxapi/classPassenger_1_1SpawnException.html +1 -1
  48. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +1 -1
  49. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +1 -1
  50. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +1 -1
  51. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +1 -1
  52. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +1 -1
  53. data/doc/cxxapi/classPassenger_1_1SystemException.html +1 -1
  54. data/doc/cxxapi/classPassenger_1_1TempFile-members.html +1 -1
  55. data/doc/cxxapi/classPassenger_1_1TempFile.html +1 -1
  56. data/doc/cxxapi/classPassenger_1_1Thread-members.html +1 -1
  57. data/doc/cxxapi/classPassenger_1_1Thread.html +1 -1
  58. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption-members.html +1 -1
  59. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption.html +1 -1
  60. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption-members.html +1 -1
  61. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption.html +1 -1
  62. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption-members.html +1 -1
  63. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption.html +1 -1
  64. data/doc/cxxapi/definitions_8h-source.html +1 -1
  65. data/doc/cxxapi/files.html +1 -1
  66. data/doc/cxxapi/functions.html +1 -1
  67. data/doc/cxxapi/functions_func.html +1 -1
  68. data/doc/cxxapi/functions_type.html +1 -1
  69. data/doc/cxxapi/functions_vars.html +1 -1
  70. data/doc/cxxapi/graph_legend.html +1 -1
  71. data/doc/cxxapi/group__Configuration.html +3 -3
  72. data/doc/cxxapi/group__Core.html +1 -1
  73. data/doc/cxxapi/group__Exceptions.html +1 -1
  74. data/doc/cxxapi/group__Hooks.html +1 -1
  75. data/doc/cxxapi/group__Support.html +1 -1
  76. data/doc/cxxapi/hierarchy.html +1 -1
  77. data/doc/cxxapi/inherits.html +1 -1
  78. data/doc/cxxapi/main.html +1 -1
  79. data/doc/cxxapi/modules.html +1 -1
  80. data/doc/cxxapi/namespacePassenger.html +1 -1
  81. data/doc/cxxapi/namespacePassenger_1_1InterruptableCalls.html +1 -1
  82. data/doc/cxxapi/namespacemembers.html +1 -1
  83. data/doc/cxxapi/namespacemembers_func.html +1 -1
  84. data/doc/cxxapi/namespacemembers_type.html +1 -1
  85. data/doc/cxxapi/namespaces.html +1 -1
  86. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +1 -1
  87. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +1 -1
  88. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +1 -1
  89. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +1 -1
  90. data/doc/rdoc/classes/Passenger/SpawnManager.html +73 -69
  91. data/doc/rdoc/created.rid +1 -1
  92. data/doc/rdoc/files/DEVELOPERS_TXT.html +1 -1
  93. data/doc/rdoc/files/ext/passenger/native_support_c.html +1 -1
  94. data/doc/rdoc/files/lib/passenger/abstract_request_handler_rb.html +1 -1
  95. data/doc/rdoc/files/lib/passenger/abstract_server_rb.html +1 -1
  96. data/doc/rdoc/files/lib/passenger/application_rb.html +1 -1
  97. data/doc/rdoc/files/lib/passenger/constants_rb.html +1 -1
  98. data/doc/rdoc/files/lib/passenger/dependencies_rb.html +1 -1
  99. data/doc/rdoc/files/lib/passenger/exceptions_rb.html +1 -1
  100. data/doc/rdoc/files/lib/passenger/message_channel_rb.html +1 -1
  101. data/doc/rdoc/files/lib/passenger/platform_info_rb.html +1 -1
  102. data/doc/rdoc/files/lib/passenger/spawn_manager_rb.html +1 -1
  103. data/doc/rdoc/files/lib/passenger/utils_rb.html +1 -1
  104. data/ext/apache2/Configuration.h +1 -1
  105. data/ext/apache2/Exceptions.h +1 -0
  106. data/ext/passenger/native_support.c +3 -0
  107. data/lib/passenger/spawn_manager.rb +5 -1
  108. metadata +2 -2
data/Rakefile CHANGED
@@ -29,7 +29,7 @@ verbose true
29
29
  ##### Configuration
30
30
 
31
31
  # Don't forget to edit Configuration.h too
32
- PACKAGE_VERSION = "2.0.5"
32
+ PACKAGE_VERSION = "2.0.6"
33
33
  OPTIMIZE = ["yes", "on", "true"].include?(ENV['OPTIMIZE'])
34
34
 
35
35
  include PlatformInfo
@@ -2179,7 +2179,7 @@ Attribution-Share Alike 3.0 Unported License</a>.</p></div>
2179
2179
  </div>
2180
2180
  <div id="footer">
2181
2181
  <div id="footer-text">
2182
- Last updated 2008-12-05 13:53:03 CEST
2182
+ Last updated 2008-12-15 15:26:50 CEST
2183
2183
  </div>
2184
2184
  </div>
2185
2185
  </body>
@@ -683,7 +683,7 @@
683
683
  <a name="l00666"></a>00666
684
684
  <a name="l00667"></a>00667 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_APPLICATION_POOL_SERVER_H_ */</span>
685
685
  </pre></div></div>
686
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Dec 5 13:53:01 2008 for Passenger by&nbsp;
686
+ <hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 15 15:27:24 2008 for Passenger by&nbsp;
687
687
  <a href="http://www.doxygen.org/index.html">
688
688
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
689
689
  </body>
@@ -217,7 +217,7 @@
217
217
  <a name="l00200"></a>00200
218
218
  <a name="l00201"></a>00201 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_APPLICATION_POOL_H_ */</span>
219
219
  </pre></div></div>
220
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Dec 5 13:53:01 2008 for Passenger by&nbsp;
220
+ <hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 15 15:27:24 2008 for Passenger by&nbsp;
221
221
  <a href="http://www.doxygen.org/index.html">
222
222
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
223
223
  </body>
@@ -441,7 +441,7 @@
441
441
  <a name="l00424"></a>00424
442
442
  <a name="l00425"></a>00425 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_APPLICATION_H_ */</span>
443
443
  </pre></div></div>
444
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Dec 5 13:53:01 2008 for Passenger by&nbsp;
444
+ <hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 15 15:27:24 2008 for Passenger by&nbsp;
445
445
  <a href="http://www.doxygen.org/index.html">
446
446
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
447
447
  </body>
@@ -54,7 +54,7 @@
54
54
  <a name="l00037"></a>00037 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_BUCKET_H_ */</span>
55
55
  <a name="l00038"></a>00038
56
56
  </pre></div></div>
57
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Dec 5 13:53:01 2008 for Passenger by&nbsp;
57
+ <hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 15 15:27:24 2008 for Passenger by&nbsp;
58
58
  <a href="http://www.doxygen.org/index.html">
59
59
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
60
60
  </body>
@@ -48,7 +48,7 @@
48
48
  <a name="l00031"></a>00031 <span class="comment"> */</span>
49
49
  <a name="l00032"></a>00032 <span class="comment"></span>
50
50
  <a name="l00033"></a>00033 <span class="comment">/** Module version number. */</span>
51
- <a name="l00034"></a><a class="code" href="group__Configuration.html#ga19398896775408d6ab7fd8ce2acd992">00034</a> <span class="preprocessor">#define PASSENGER_VERSION "2.0.5"</span>
51
+ <a name="l00034"></a><a class="code" href="group__Configuration.html#ga19398896775408d6ab7fd8ce2acd992">00034</a> <span class="preprocessor">#define PASSENGER_VERSION "2.0.6"</span>
52
52
  <a name="l00035"></a>00035 <span class="preprocessor"></span>
53
53
  <a name="l00036"></a>00036 <span class="preprocessor">#ifdef __cplusplus</span>
54
54
  <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;set&gt;</span>
@@ -188,7 +188,7 @@
188
188
  <a name="l00171"></a>00171
189
189
  <a name="l00172"></a>00172 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_CONFIGURATION_H_ */</span>
190
190
  </pre></div></div>
191
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Dec 5 13:53:01 2008 for Passenger by&nbsp;
191
+ <hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 15 15:27:24 2008 for Passenger by&nbsp;
192
192
  <a href="http://www.doxygen.org/index.html">
193
193
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
194
194
  </body>
@@ -119,7 +119,7 @@
119
119
  <a name="l00102"></a>00102
120
120
  <a name="l00103"></a>00103 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_DUMMY_SPAWN_MANAGER_H_ */</span>
121
121
  </pre></div></div>
122
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Dec 5 13:53:01 2008 for Passenger by&nbsp;
122
+ <hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 15 15:27:24 2008 for Passenger by&nbsp;
123
123
  <a href="http://www.doxygen.org/index.html">
124
124
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
125
125
  </body>
@@ -40,204 +40,205 @@
40
40
  <a name="l00023"></a>00023 <span class="preprocessor">#include &lt;exception&gt;</span>
41
41
  <a name="l00024"></a>00024 <span class="preprocessor">#include &lt;string&gt;</span>
42
42
  <a name="l00025"></a>00025 <span class="preprocessor">#include &lt;sstream&gt;</span>
43
- <a name="l00026"></a>00026 <span class="comment"></span>
44
- <a name="l00027"></a>00027 <span class="comment">/**</span>
45
- <a name="l00028"></a>00028 <span class="comment"> * @defgroup Exceptions Exceptions</span>
46
- <a name="l00029"></a>00029 <span class="comment"> */</span>
47
- <a name="l00030"></a>00030
48
- <a name="l00031"></a>00031 <span class="keyword">namespace </span>Passenger {
49
- <a name="l00032"></a>00032
50
- <a name="l00033"></a>00033 <span class="keyword">using namespace </span>std;
51
- <a name="l00034"></a>00034 <span class="comment"></span>
52
- <a name="l00035"></a>00035 <span class="comment">/**</span>
53
- <a name="l00036"></a>00036 <span class="comment"> * Represents an error returned by a system call or a standard library call.</span>
54
- <a name="l00037"></a>00037 <span class="comment"> *</span>
55
- <a name="l00038"></a>00038 <span class="comment"> * Use the code() method to find out the value of &lt;tt&gt;errno&lt;/tt&gt; at the time</span>
56
- <a name="l00039"></a>00039 <span class="comment"> * the error occured.</span>
57
- <a name="l00040"></a>00040 <span class="comment"> *</span>
58
- <a name="l00041"></a>00041 <span class="comment"> * @ingroup Exceptions</span>
59
- <a name="l00042"></a>00042 <span class="comment"> */</span>
60
- <a name="l00043"></a><a class="code" href="classPassenger_1_1SystemException.html">00043</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a>: <span class="keyword">public</span> exception {
61
- <a name="l00044"></a>00044 <span class="keyword">private</span>:
62
- <a name="l00045"></a>00045 <span class="keywordtype">string</span> briefMessage;
63
- <a name="l00046"></a>00046 <span class="keywordtype">string</span> systemMessage;
64
- <a name="l00047"></a>00047 <span class="keywordtype">string</span> fullMessage;
65
- <a name="l00048"></a>00048 <span class="keywordtype">int</span> m_code;
66
- <a name="l00049"></a>00049 <span class="keyword">public</span>:<span class="comment"></span>
67
- <a name="l00050"></a>00050 <span class="comment"> /**</span>
68
- <a name="l00051"></a>00051 <span class="comment"> * Create a new SystemException.</span>
69
- <a name="l00052"></a>00052 <span class="comment"> *</span>
70
- <a name="l00053"></a>00053 <span class="comment"> * @param message A message describing the error.</span>
71
- <a name="l00054"></a>00054 <span class="comment"> * @param errorCode The error code, i.e. the value of errno right after the error occured.</span>
72
- <a name="l00055"></a>00055 <span class="comment"> * @note A system description of the error will be appended to the given message.</span>
73
- <a name="l00056"></a>00056 <span class="comment"> * For example, if &lt;tt&gt;errorCode&lt;/tt&gt; is &lt;tt&gt;EBADF&lt;/tt&gt;, and &lt;tt&gt;message&lt;/tt&gt;</span>
74
- <a name="l00057"></a>00057 <span class="comment"> * is &lt;em&gt;"Something happened"&lt;/em&gt;, then what() will return &lt;em&gt;"Something happened: Bad</span>
75
- <a name="l00058"></a>00058 <span class="comment"> * file descriptor (10)"&lt;/em&gt; (if 10 is the number for EBADF).</span>
76
- <a name="l00059"></a>00059 <span class="comment"> * @post code() == errorCode</span>
77
- <a name="l00060"></a>00060 <span class="comment"> * @post brief() == message</span>
78
- <a name="l00061"></a>00061 <span class="comment"> */</span>
79
- <a name="l00062"></a><a class="code" href="classPassenger_1_1SystemException.html#4ee42f81106408c91726a62287e8471c">00062</a> <a class="code" href="classPassenger_1_1SystemException.html#4ee42f81106408c91726a62287e8471c" title="Create a new SystemException.">SystemException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message, <span class="keywordtype">int</span> errorCode) {
80
- <a name="l00063"></a>00063 stringstream str;
81
- <a name="l00064"></a>00064
82
- <a name="l00065"></a>00065 briefMessage = message;
83
- <a name="l00066"></a>00066 str &lt;&lt; strerror(errorCode) &lt;&lt; <span class="stringliteral">" ("</span> &lt;&lt; errorCode &lt;&lt; <span class="stringliteral">")"</span>;
84
- <a name="l00067"></a>00067 systemMessage = str.str();
85
- <a name="l00068"></a>00068
86
- <a name="l00069"></a>00069 fullMessage = briefMessage + <span class="stringliteral">": "</span> + systemMessage;
87
- <a name="l00070"></a>00070 m_code = errorCode;
88
- <a name="l00071"></a>00071 }
89
- <a name="l00072"></a>00072
90
- <a name="l00073"></a>00073 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a>() throw() {}
91
- <a name="l00074"></a>00074
92
- <a name="l00075"></a>00075 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> throw() {
93
- <a name="l00076"></a>00076 <span class="keywordflow">return</span> fullMessage.c_str();
94
- <a name="l00077"></a>00077 }
95
- <a name="l00078"></a>00078 <span class="comment"></span>
96
- <a name="l00079"></a>00079 <span class="comment"> /**</span>
97
- <a name="l00080"></a>00080 <span class="comment"> * The value of &lt;tt&gt;errno&lt;/tt&gt; at the time the error occured.</span>
98
- <a name="l00081"></a>00081 <span class="comment"> */</span>
99
- <a name="l00082"></a><a class="code" href="classPassenger_1_1SystemException.html#ee7a6672bf79b72a4c3ee70c57d6a47c">00082</a> <span class="keywordtype">int</span> <a class="code" href="classPassenger_1_1SystemException.html#ee7a6672bf79b72a4c3ee70c57d6a47c" title="The value of errno at the time the error occured.">code</a>() <span class="keyword">const</span> throw() {
100
- <a name="l00083"></a>00083 <span class="keywordflow">return</span> m_code;
101
- <a name="l00084"></a>00084 }
102
- <a name="l00085"></a>00085 <span class="comment"></span>
103
- <a name="l00086"></a>00086 <span class="comment"> /**</span>
104
- <a name="l00087"></a>00087 <span class="comment"> * Returns a brief version of the exception message. This message does</span>
105
- <a name="l00088"></a>00088 <span class="comment"> * not include the system error description, and is equivalent to the</span>
106
- <a name="l00089"></a>00089 <span class="comment"> * value of the &lt;tt&gt;message&lt;/tt&gt; parameter as passed to the constructor.</span>
107
- <a name="l00090"></a>00090 <span class="comment"> */</span>
108
- <a name="l00091"></a><a class="code" href="classPassenger_1_1SystemException.html#84fa2ab4f5b7b96704734fcdfdaa0269">00091</a> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1SystemException.html#84fa2ab4f5b7b96704734fcdfdaa0269" title="Returns a brief version of the exception message.">brief</a>() <span class="keyword">const</span> throw() {
109
- <a name="l00092"></a>00092 <span class="keywordflow">return</span> briefMessage;
110
- <a name="l00093"></a>00093 }
111
- <a name="l00094"></a>00094 <span class="comment"></span>
112
- <a name="l00095"></a>00095 <span class="comment"> /**</span>
113
- <a name="l00096"></a>00096 <span class="comment"> * Returns the system's error message. This message contains both the</span>
114
- <a name="l00097"></a>00097 <span class="comment"> * content of &lt;tt&gt;strerror(errno)&lt;/tt&gt; and the errno number itself.</span>
115
- <a name="l00098"></a>00098 <span class="comment"> */</span>
116
- <a name="l00099"></a><a class="code" href="classPassenger_1_1SystemException.html#0ef41d755fea2c9b1db2252e7c418dc8">00099</a> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1SystemException.html#0ef41d755fea2c9b1db2252e7c418dc8" title="Returns the system&amp;#39;s error message.">sys</a>() <span class="keyword">const</span> throw() {
117
- <a name="l00100"></a>00100 <span class="keywordflow">return</span> systemMessage;
118
- <a name="l00101"></a>00101 }
119
- <a name="l00102"></a>00102 };
120
- <a name="l00103"></a>00103 <span class="comment"></span>
121
- <a name="l00104"></a>00104 <span class="comment">/**</span>
122
- <a name="l00105"></a>00105 <span class="comment"> * A filesystem error, as returned by the operating system. This may include,</span>
123
- <a name="l00106"></a>00106 <span class="comment"> * for example, permission errors.</span>
124
- <a name="l00107"></a>00107 <span class="comment"> *</span>
125
- <a name="l00108"></a>00108 <span class="comment"> * @ingroup Exceptions</span>
126
- <a name="l00109"></a>00109 <span class="comment"> */</span>
127
- <a name="l00110"></a><a class="code" href="classPassenger_1_1FileSystemException.html">00110</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1FileSystemException.html" title="A filesystem error, as returned by the operating system.">FileSystemException</a>: <span class="keyword">public</span> <a class="code" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a> {
128
- <a name="l00111"></a>00111 <span class="keyword">private</span>:
129
- <a name="l00112"></a>00112 <span class="keywordtype">string</span> m_filename;
130
- <a name="l00113"></a>00113 <span class="keyword">public</span>:
131
- <a name="l00114"></a>00114 <a class="code" href="classPassenger_1_1FileSystemException.html" title="A filesystem error, as returned by the operating system.">FileSystemException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message, <span class="keywordtype">int</span> errorCode,
132
- <a name="l00115"></a>00115 <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;<a class="code" href="classPassenger_1_1FileSystemException.html#7eef8fefd84a07efa9fe3a76129a4386" title="The filename that&amp;#39;s associated to the error.">filename</a>)
133
- <a name="l00116"></a>00116 : <a class="code" href="classPassenger_1_1SystemException.html#4ee42f81106408c91726a62287e8471c" title="Create a new SystemException.">SystemException</a>(message, errorCode),
134
- <a name="l00117"></a>00117 m_filename(filename) {}
135
- <a name="l00118"></a>00118
136
- <a name="l00119"></a>00119 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1FileSystemException.html" title="A filesystem error, as returned by the operating system.">FileSystemException</a>() <span class="keywordflow">throw</span>() {}
137
- <a name="l00120"></a>00120 <span class="comment"></span>
138
- <a name="l00121"></a>00121 <span class="comment"> /**</span>
139
- <a name="l00122"></a>00122 <span class="comment"> * The filename that's associated to the error.</span>
140
- <a name="l00123"></a>00123 <span class="comment"> */</span>
141
- <a name="l00124"></a><a class="code" href="classPassenger_1_1FileSystemException.html#7eef8fefd84a07efa9fe3a76129a4386">00124</a> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1FileSystemException.html#7eef8fefd84a07efa9fe3a76129a4386" title="The filename that&amp;#39;s associated to the error.">filename</a>() <span class="keyword">const</span> throw() {
142
- <a name="l00125"></a>00125 <span class="keywordflow">return</span> m_filename;
143
- <a name="l00126"></a>00126 }
144
- <a name="l00127"></a>00127 };
145
- <a name="l00128"></a>00128 <span class="comment"></span>
146
- <a name="l00129"></a>00129 <span class="comment">/**</span>
147
- <a name="l00130"></a>00130 <span class="comment"> * Represents an error that occured during an I/O operation.</span>
148
- <a name="l00131"></a>00131 <span class="comment"> *</span>
149
- <a name="l00132"></a>00132 <span class="comment"> * @ingroup Exceptions</span>
150
- <a name="l00133"></a>00133 <span class="comment"> */</span>
151
- <a name="l00134"></a><a class="code" href="classPassenger_1_1IOException.html">00134</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>: <span class="keyword">public</span> exception {
152
- <a name="l00135"></a>00135 <span class="keyword">private</span>:
153
- <a name="l00136"></a>00136 <span class="keywordtype">string</span> msg;
154
- <a name="l00137"></a>00137 <span class="keyword">public</span>:
155
- <a name="l00138"></a>00138 <a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): msg(message) {}
156
- <a name="l00139"></a>00139 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>() <span class="keywordflow">throw</span>() {}
157
- <a name="l00140"></a>00140 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
158
- <a name="l00141"></a>00141 };
159
- <a name="l00142"></a>00142 <span class="comment"></span>
160
- <a name="l00143"></a>00143 <span class="comment">/**</span>
161
- <a name="l00144"></a>00144 <span class="comment"> * Thrown when a certain file cannot be found.</span>
162
- <a name="l00145"></a>00145 <span class="comment"> */</span>
163
- <a name="l00146"></a><a class="code" href="classPassenger_1_1FileNotFoundException.html">00146</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1FileNotFoundException.html" title="Thrown when a certain file cannot be found.">FileNotFoundException</a>: <span class="keyword">public</span> <a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a> {
164
- <a name="l00147"></a>00147 <span class="keyword">public</span>:
165
- <a name="l00148"></a>00148 <a class="code" href="classPassenger_1_1FileNotFoundException.html" title="Thrown when a certain file cannot be found.">FileNotFoundException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): <a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>(message) {}
166
- <a name="l00149"></a>00149 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1FileNotFoundException.html" title="Thrown when a certain file cannot be found.">FileNotFoundException</a>() <span class="keywordflow">throw</span>() {}
167
- <a name="l00150"></a>00150 };
168
- <a name="l00151"></a>00151 <span class="comment"></span>
169
- <a name="l00152"></a>00152 <span class="comment">/**</span>
170
- <a name="l00153"></a>00153 <span class="comment"> * Thrown when an invalid configuration is given.</span>
171
- <a name="l00154"></a>00154 <span class="comment"> */</span>
172
- <a name="l00155"></a><a class="code" href="classPassenger_1_1ConfigurationException.html">00155</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1ConfigurationException.html" title="Thrown when an invalid configuration is given.">ConfigurationException</a>: <span class="keyword">public</span> exception {
173
- <a name="l00156"></a>00156 <span class="keyword">private</span>:
174
- <a name="l00157"></a>00157 <span class="keywordtype">string</span> msg;
175
- <a name="l00158"></a>00158 <span class="keyword">public</span>:
176
- <a name="l00159"></a>00159 <a class="code" href="classPassenger_1_1ConfigurationException.html" title="Thrown when an invalid configuration is given.">ConfigurationException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): msg(message) {}
177
- <a name="l00160"></a>00160 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1ConfigurationException.html" title="Thrown when an invalid configuration is given.">ConfigurationException</a>() <span class="keywordflow">throw</span>() {}
178
- <a name="l00161"></a>00161 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
179
- <a name="l00162"></a>00162 };
180
- <a name="l00163"></a>00163 <span class="comment"></span>
181
- <a name="l00164"></a>00164 <span class="comment">/**</span>
182
- <a name="l00165"></a>00165 <span class="comment"> * Thrown when SpawnManager or ApplicationPool fails to spawn an application</span>
183
- <a name="l00166"></a>00166 <span class="comment"> * instance. The exception may contain an error page, which is a user-friendly</span>
184
- <a name="l00167"></a>00167 <span class="comment"> * HTML page with details about the error.</span>
185
- <a name="l00168"></a>00168 <span class="comment"> */</span>
186
- <a name="l00169"></a><a class="code" href="classPassenger_1_1SpawnException.html">00169</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>: <span class="keyword">public</span> exception {
187
- <a name="l00170"></a>00170 <span class="keyword">private</span>:
188
- <a name="l00171"></a>00171 <span class="keywordtype">string</span> msg;
189
- <a name="l00172"></a>00172 <span class="keywordtype">bool</span> m_hasErrorPage;
190
- <a name="l00173"></a>00173 <span class="keywordtype">string</span> m_errorPage;
191
- <a name="l00174"></a>00174 <span class="keyword">public</span>:
192
- <a name="l00175"></a>00175 <a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message)
193
- <a name="l00176"></a>00176 : msg(message) {
194
- <a name="l00177"></a>00177 m_hasErrorPage = <span class="keyword">false</span>;
195
- <a name="l00178"></a>00178 }
196
- <a name="l00179"></a>00179
197
- <a name="l00180"></a>00180 <a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;errorPage)
198
- <a name="l00181"></a>00181 : msg(message), m_errorPage(errorPage) {
199
- <a name="l00182"></a>00182 m_hasErrorPage = <span class="keyword">true</span>;
200
- <a name="l00183"></a>00183 }
201
- <a name="l00184"></a>00184
202
- <a name="l00185"></a>00185 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>() <span class="keywordflow">throw</span>() {}
203
- <a name="l00186"></a>00186 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
204
- <a name="l00187"></a>00187 <span class="comment"></span>
205
- <a name="l00188"></a>00188 <span class="comment"> /**</span>
206
- <a name="l00189"></a>00189 <span class="comment"> * Check whether an error page is available.</span>
207
- <a name="l00190"></a>00190 <span class="comment"> */</span>
208
- <a name="l00191"></a><a class="code" href="classPassenger_1_1SpawnException.html#e65dc272e183fd9e5637a4091cc6bbf4">00191</a> <span class="keywordtype">bool</span> <a class="code" href="classPassenger_1_1SpawnException.html#e65dc272e183fd9e5637a4091cc6bbf4" title="Check whether an error page is available.">hasErrorPage</a>()<span class="keyword"> const </span>{
209
- <a name="l00192"></a>00192 <span class="keywordflow">return</span> m_hasErrorPage;
210
- <a name="l00193"></a>00193 }
211
- <a name="l00194"></a>00194 <span class="comment"></span>
212
- <a name="l00195"></a>00195 <span class="comment"> /**</span>
213
- <a name="l00196"></a>00196 <span class="comment"> * Return the error page content.</span>
214
- <a name="l00197"></a>00197 <span class="comment"> *</span>
215
- <a name="l00198"></a>00198 <span class="comment"> * @pre hasErrorPage()</span>
216
- <a name="l00199"></a>00199 <span class="comment"> */</span>
217
- <a name="l00200"></a><a class="code" href="classPassenger_1_1SpawnException.html#6f675a37edd7070875d0744e7dd010a1">00200</a> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1SpawnException.html#6f675a37edd7070875d0744e7dd010a1" title="Return the error page content.">getErrorPage</a>()<span class="keyword"> const </span>{
218
- <a name="l00201"></a>00201 <span class="keywordflow">return</span> m_errorPage;
219
- <a name="l00202"></a>00202 }
220
- <a name="l00203"></a>00203 };
221
- <a name="l00204"></a>00204 <span class="comment"></span>
222
- <a name="l00205"></a>00205 <span class="comment">/**</span>
223
- <a name="l00206"></a>00206 <span class="comment"> * The application pool is too busy and cannot fulfill a get() request.</span>
224
- <a name="l00207"></a>00207 <span class="comment"> *</span>
225
- <a name="l00208"></a>00208 <span class="comment"> * @ingroup Exceptions</span>
226
- <a name="l00209"></a>00209 <span class="comment"> */</span>
227
- <a name="l00210"></a><a class="code" href="classPassenger_1_1BusyException.html">00210</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1BusyException.html" title="The application pool is too busy and cannot fulfill a get() request.">BusyException</a>: <span class="keyword">public</span> exception {
228
- <a name="l00211"></a>00211 <span class="keyword">private</span>:
229
- <a name="l00212"></a>00212 <span class="keywordtype">string</span> msg;
230
- <a name="l00213"></a>00213 <span class="keyword">public</span>:
231
- <a name="l00214"></a>00214 <a class="code" href="classPassenger_1_1BusyException.html" title="The application pool is too busy and cannot fulfill a get() request.">BusyException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): msg(message) {}
232
- <a name="l00215"></a>00215 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1BusyException.html" title="The application pool is too busy and cannot fulfill a get() request.">BusyException</a>() <span class="keywordflow">throw</span>() {}
233
- <a name="l00216"></a>00216 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
234
- <a name="l00217"></a>00217 };
235
- <a name="l00218"></a>00218
236
- <a name="l00219"></a>00219 } <span class="comment">// namespace Passenger</span>
237
- <a name="l00220"></a>00220
238
- <a name="l00221"></a>00221 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_EXCEPTIONS_H_ */</span>
43
+ <a name="l00026"></a>00026 <span class="preprocessor">#include &lt;cstring&gt;</span>
44
+ <a name="l00027"></a>00027 <span class="comment"></span>
45
+ <a name="l00028"></a>00028 <span class="comment">/**</span>
46
+ <a name="l00029"></a>00029 <span class="comment"> * @defgroup Exceptions Exceptions</span>
47
+ <a name="l00030"></a>00030 <span class="comment"> */</span>
48
+ <a name="l00031"></a>00031
49
+ <a name="l00032"></a>00032 <span class="keyword">namespace </span>Passenger {
50
+ <a name="l00033"></a>00033
51
+ <a name="l00034"></a>00034 <span class="keyword">using namespace </span>std;
52
+ <a name="l00035"></a>00035 <span class="comment"></span>
53
+ <a name="l00036"></a>00036 <span class="comment">/**</span>
54
+ <a name="l00037"></a>00037 <span class="comment"> * Represents an error returned by a system call or a standard library call.</span>
55
+ <a name="l00038"></a>00038 <span class="comment"> *</span>
56
+ <a name="l00039"></a>00039 <span class="comment"> * Use the code() method to find out the value of &lt;tt&gt;errno&lt;/tt&gt; at the time</span>
57
+ <a name="l00040"></a>00040 <span class="comment"> * the error occured.</span>
58
+ <a name="l00041"></a>00041 <span class="comment"> *</span>
59
+ <a name="l00042"></a>00042 <span class="comment"> * @ingroup Exceptions</span>
60
+ <a name="l00043"></a>00043 <span class="comment"> */</span>
61
+ <a name="l00044"></a><a class="code" href="classPassenger_1_1SystemException.html">00044</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a>: <span class="keyword">public</span> exception {
62
+ <a name="l00045"></a>00045 <span class="keyword">private</span>:
63
+ <a name="l00046"></a>00046 <span class="keywordtype">string</span> briefMessage;
64
+ <a name="l00047"></a>00047 <span class="keywordtype">string</span> systemMessage;
65
+ <a name="l00048"></a>00048 <span class="keywordtype">string</span> fullMessage;
66
+ <a name="l00049"></a>00049 <span class="keywordtype">int</span> m_code;
67
+ <a name="l00050"></a>00050 <span class="keyword">public</span>:<span class="comment"></span>
68
+ <a name="l00051"></a>00051 <span class="comment"> /**</span>
69
+ <a name="l00052"></a>00052 <span class="comment"> * Create a new SystemException.</span>
70
+ <a name="l00053"></a>00053 <span class="comment"> *</span>
71
+ <a name="l00054"></a>00054 <span class="comment"> * @param message A message describing the error.</span>
72
+ <a name="l00055"></a>00055 <span class="comment"> * @param errorCode The error code, i.e. the value of errno right after the error occured.</span>
73
+ <a name="l00056"></a>00056 <span class="comment"> * @note A system description of the error will be appended to the given message.</span>
74
+ <a name="l00057"></a>00057 <span class="comment"> * For example, if &lt;tt&gt;errorCode&lt;/tt&gt; is &lt;tt&gt;EBADF&lt;/tt&gt;, and &lt;tt&gt;message&lt;/tt&gt;</span>
75
+ <a name="l00058"></a>00058 <span class="comment"> * is &lt;em&gt;"Something happened"&lt;/em&gt;, then what() will return &lt;em&gt;"Something happened: Bad</span>
76
+ <a name="l00059"></a>00059 <span class="comment"> * file descriptor (10)"&lt;/em&gt; (if 10 is the number for EBADF).</span>
77
+ <a name="l00060"></a>00060 <span class="comment"> * @post code() == errorCode</span>
78
+ <a name="l00061"></a>00061 <span class="comment"> * @post brief() == message</span>
79
+ <a name="l00062"></a>00062 <span class="comment"> */</span>
80
+ <a name="l00063"></a><a class="code" href="classPassenger_1_1SystemException.html#4ee42f81106408c91726a62287e8471c">00063</a> <a class="code" href="classPassenger_1_1SystemException.html#4ee42f81106408c91726a62287e8471c" title="Create a new SystemException.">SystemException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message, <span class="keywordtype">int</span> errorCode) {
81
+ <a name="l00064"></a>00064 stringstream str;
82
+ <a name="l00065"></a>00065
83
+ <a name="l00066"></a>00066 briefMessage = message;
84
+ <a name="l00067"></a>00067 str &lt;&lt; strerror(errorCode) &lt;&lt; <span class="stringliteral">" ("</span> &lt;&lt; errorCode &lt;&lt; <span class="stringliteral">")"</span>;
85
+ <a name="l00068"></a>00068 systemMessage = str.str();
86
+ <a name="l00069"></a>00069
87
+ <a name="l00070"></a>00070 fullMessage = briefMessage + <span class="stringliteral">": "</span> + systemMessage;
88
+ <a name="l00071"></a>00071 m_code = errorCode;
89
+ <a name="l00072"></a>00072 }
90
+ <a name="l00073"></a>00073
91
+ <a name="l00074"></a>00074 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a>() throw() {}
92
+ <a name="l00075"></a>00075
93
+ <a name="l00076"></a>00076 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> throw() {
94
+ <a name="l00077"></a>00077 <span class="keywordflow">return</span> fullMessage.c_str();
95
+ <a name="l00078"></a>00078 }
96
+ <a name="l00079"></a>00079 <span class="comment"></span>
97
+ <a name="l00080"></a>00080 <span class="comment"> /**</span>
98
+ <a name="l00081"></a>00081 <span class="comment"> * The value of &lt;tt&gt;errno&lt;/tt&gt; at the time the error occured.</span>
99
+ <a name="l00082"></a>00082 <span class="comment"> */</span>
100
+ <a name="l00083"></a><a class="code" href="classPassenger_1_1SystemException.html#ee7a6672bf79b72a4c3ee70c57d6a47c">00083</a> <span class="keywordtype">int</span> <a class="code" href="classPassenger_1_1SystemException.html#ee7a6672bf79b72a4c3ee70c57d6a47c" title="The value of errno at the time the error occured.">code</a>() <span class="keyword">const</span> throw() {
101
+ <a name="l00084"></a>00084 <span class="keywordflow">return</span> m_code;
102
+ <a name="l00085"></a>00085 }
103
+ <a name="l00086"></a>00086 <span class="comment"></span>
104
+ <a name="l00087"></a>00087 <span class="comment"> /**</span>
105
+ <a name="l00088"></a>00088 <span class="comment"> * Returns a brief version of the exception message. This message does</span>
106
+ <a name="l00089"></a>00089 <span class="comment"> * not include the system error description, and is equivalent to the</span>
107
+ <a name="l00090"></a>00090 <span class="comment"> * value of the &lt;tt&gt;message&lt;/tt&gt; parameter as passed to the constructor.</span>
108
+ <a name="l00091"></a>00091 <span class="comment"> */</span>
109
+ <a name="l00092"></a><a class="code" href="classPassenger_1_1SystemException.html#84fa2ab4f5b7b96704734fcdfdaa0269">00092</a> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1SystemException.html#84fa2ab4f5b7b96704734fcdfdaa0269" title="Returns a brief version of the exception message.">brief</a>() <span class="keyword">const</span> throw() {
110
+ <a name="l00093"></a>00093 <span class="keywordflow">return</span> briefMessage;
111
+ <a name="l00094"></a>00094 }
112
+ <a name="l00095"></a>00095 <span class="comment"></span>
113
+ <a name="l00096"></a>00096 <span class="comment"> /**</span>
114
+ <a name="l00097"></a>00097 <span class="comment"> * Returns the system's error message. This message contains both the</span>
115
+ <a name="l00098"></a>00098 <span class="comment"> * content of &lt;tt&gt;strerror(errno)&lt;/tt&gt; and the errno number itself.</span>
116
+ <a name="l00099"></a>00099 <span class="comment"> */</span>
117
+ <a name="l00100"></a><a class="code" href="classPassenger_1_1SystemException.html#0ef41d755fea2c9b1db2252e7c418dc8">00100</a> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1SystemException.html#0ef41d755fea2c9b1db2252e7c418dc8" title="Returns the system&amp;#39;s error message.">sys</a>() <span class="keyword">const</span> throw() {
118
+ <a name="l00101"></a>00101 <span class="keywordflow">return</span> systemMessage;
119
+ <a name="l00102"></a>00102 }
120
+ <a name="l00103"></a>00103 };
121
+ <a name="l00104"></a>00104 <span class="comment"></span>
122
+ <a name="l00105"></a>00105 <span class="comment">/**</span>
123
+ <a name="l00106"></a>00106 <span class="comment"> * A filesystem error, as returned by the operating system. This may include,</span>
124
+ <a name="l00107"></a>00107 <span class="comment"> * for example, permission errors.</span>
125
+ <a name="l00108"></a>00108 <span class="comment"> *</span>
126
+ <a name="l00109"></a>00109 <span class="comment"> * @ingroup Exceptions</span>
127
+ <a name="l00110"></a>00110 <span class="comment"> */</span>
128
+ <a name="l00111"></a><a class="code" href="classPassenger_1_1FileSystemException.html">00111</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1FileSystemException.html" title="A filesystem error, as returned by the operating system.">FileSystemException</a>: <span class="keyword">public</span> <a class="code" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a> {
129
+ <a name="l00112"></a>00112 <span class="keyword">private</span>:
130
+ <a name="l00113"></a>00113 <span class="keywordtype">string</span> m_filename;
131
+ <a name="l00114"></a>00114 <span class="keyword">public</span>:
132
+ <a name="l00115"></a>00115 <a class="code" href="classPassenger_1_1FileSystemException.html" title="A filesystem error, as returned by the operating system.">FileSystemException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message, <span class="keywordtype">int</span> errorCode,
133
+ <a name="l00116"></a>00116 <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;<a class="code" href="classPassenger_1_1FileSystemException.html#7eef8fefd84a07efa9fe3a76129a4386" title="The filename that&amp;#39;s associated to the error.">filename</a>)
134
+ <a name="l00117"></a>00117 : <a class="code" href="classPassenger_1_1SystemException.html#4ee42f81106408c91726a62287e8471c" title="Create a new SystemException.">SystemException</a>(message, errorCode),
135
+ <a name="l00118"></a>00118 m_filename(filename) {}
136
+ <a name="l00119"></a>00119
137
+ <a name="l00120"></a>00120 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1FileSystemException.html" title="A filesystem error, as returned by the operating system.">FileSystemException</a>() <span class="keywordflow">throw</span>() {}
138
+ <a name="l00121"></a>00121 <span class="comment"></span>
139
+ <a name="l00122"></a>00122 <span class="comment"> /**</span>
140
+ <a name="l00123"></a>00123 <span class="comment"> * The filename that's associated to the error.</span>
141
+ <a name="l00124"></a>00124 <span class="comment"> */</span>
142
+ <a name="l00125"></a><a class="code" href="classPassenger_1_1FileSystemException.html#7eef8fefd84a07efa9fe3a76129a4386">00125</a> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1FileSystemException.html#7eef8fefd84a07efa9fe3a76129a4386" title="The filename that&amp;#39;s associated to the error.">filename</a>() <span class="keyword">const</span> throw() {
143
+ <a name="l00126"></a>00126 <span class="keywordflow">return</span> m_filename;
144
+ <a name="l00127"></a>00127 }
145
+ <a name="l00128"></a>00128 };
146
+ <a name="l00129"></a>00129 <span class="comment"></span>
147
+ <a name="l00130"></a>00130 <span class="comment">/**</span>
148
+ <a name="l00131"></a>00131 <span class="comment"> * Represents an error that occured during an I/O operation.</span>
149
+ <a name="l00132"></a>00132 <span class="comment"> *</span>
150
+ <a name="l00133"></a>00133 <span class="comment"> * @ingroup Exceptions</span>
151
+ <a name="l00134"></a>00134 <span class="comment"> */</span>
152
+ <a name="l00135"></a><a class="code" href="classPassenger_1_1IOException.html">00135</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>: <span class="keyword">public</span> exception {
153
+ <a name="l00136"></a>00136 <span class="keyword">private</span>:
154
+ <a name="l00137"></a>00137 <span class="keywordtype">string</span> msg;
155
+ <a name="l00138"></a>00138 <span class="keyword">public</span>:
156
+ <a name="l00139"></a>00139 <a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): msg(message) {}
157
+ <a name="l00140"></a>00140 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>() <span class="keywordflow">throw</span>() {}
158
+ <a name="l00141"></a>00141 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
159
+ <a name="l00142"></a>00142 };
160
+ <a name="l00143"></a>00143 <span class="comment"></span>
161
+ <a name="l00144"></a>00144 <span class="comment">/**</span>
162
+ <a name="l00145"></a>00145 <span class="comment"> * Thrown when a certain file cannot be found.</span>
163
+ <a name="l00146"></a>00146 <span class="comment"> */</span>
164
+ <a name="l00147"></a><a class="code" href="classPassenger_1_1FileNotFoundException.html">00147</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1FileNotFoundException.html" title="Thrown when a certain file cannot be found.">FileNotFoundException</a>: <span class="keyword">public</span> <a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a> {
165
+ <a name="l00148"></a>00148 <span class="keyword">public</span>:
166
+ <a name="l00149"></a>00149 <a class="code" href="classPassenger_1_1FileNotFoundException.html" title="Thrown when a certain file cannot be found.">FileNotFoundException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): <a class="code" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a>(message) {}
167
+ <a name="l00150"></a>00150 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1FileNotFoundException.html" title="Thrown when a certain file cannot be found.">FileNotFoundException</a>() <span class="keywordflow">throw</span>() {}
168
+ <a name="l00151"></a>00151 };
169
+ <a name="l00152"></a>00152 <span class="comment"></span>
170
+ <a name="l00153"></a>00153 <span class="comment">/**</span>
171
+ <a name="l00154"></a>00154 <span class="comment"> * Thrown when an invalid configuration is given.</span>
172
+ <a name="l00155"></a>00155 <span class="comment"> */</span>
173
+ <a name="l00156"></a><a class="code" href="classPassenger_1_1ConfigurationException.html">00156</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1ConfigurationException.html" title="Thrown when an invalid configuration is given.">ConfigurationException</a>: <span class="keyword">public</span> exception {
174
+ <a name="l00157"></a>00157 <span class="keyword">private</span>:
175
+ <a name="l00158"></a>00158 <span class="keywordtype">string</span> msg;
176
+ <a name="l00159"></a>00159 <span class="keyword">public</span>:
177
+ <a name="l00160"></a>00160 <a class="code" href="classPassenger_1_1ConfigurationException.html" title="Thrown when an invalid configuration is given.">ConfigurationException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): msg(message) {}
178
+ <a name="l00161"></a>00161 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1ConfigurationException.html" title="Thrown when an invalid configuration is given.">ConfigurationException</a>() <span class="keywordflow">throw</span>() {}
179
+ <a name="l00162"></a>00162 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
180
+ <a name="l00163"></a>00163 };
181
+ <a name="l00164"></a>00164 <span class="comment"></span>
182
+ <a name="l00165"></a>00165 <span class="comment">/**</span>
183
+ <a name="l00166"></a>00166 <span class="comment"> * Thrown when SpawnManager or ApplicationPool fails to spawn an application</span>
184
+ <a name="l00167"></a>00167 <span class="comment"> * instance. The exception may contain an error page, which is a user-friendly</span>
185
+ <a name="l00168"></a>00168 <span class="comment"> * HTML page with details about the error.</span>
186
+ <a name="l00169"></a>00169 <span class="comment"> */</span>
187
+ <a name="l00170"></a><a class="code" href="classPassenger_1_1SpawnException.html">00170</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>: <span class="keyword">public</span> exception {
188
+ <a name="l00171"></a>00171 <span class="keyword">private</span>:
189
+ <a name="l00172"></a>00172 <span class="keywordtype">string</span> msg;
190
+ <a name="l00173"></a>00173 <span class="keywordtype">bool</span> m_hasErrorPage;
191
+ <a name="l00174"></a>00174 <span class="keywordtype">string</span> m_errorPage;
192
+ <a name="l00175"></a>00175 <span class="keyword">public</span>:
193
+ <a name="l00176"></a>00176 <a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message)
194
+ <a name="l00177"></a>00177 : msg(message) {
195
+ <a name="l00178"></a>00178 m_hasErrorPage = <span class="keyword">false</span>;
196
+ <a name="l00179"></a>00179 }
197
+ <a name="l00180"></a>00180
198
+ <a name="l00181"></a>00181 <a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;errorPage)
199
+ <a name="l00182"></a>00182 : msg(message), m_errorPage(errorPage) {
200
+ <a name="l00183"></a>00183 m_hasErrorPage = <span class="keyword">true</span>;
201
+ <a name="l00184"></a>00184 }
202
+ <a name="l00185"></a>00185
203
+ <a name="l00186"></a>00186 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1SpawnException.html" title="Thrown when SpawnManager or ApplicationPool fails to spawn an application instance...">SpawnException</a>() <span class="keywordflow">throw</span>() {}
204
+ <a name="l00187"></a>00187 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
205
+ <a name="l00188"></a>00188 <span class="comment"></span>
206
+ <a name="l00189"></a>00189 <span class="comment"> /**</span>
207
+ <a name="l00190"></a>00190 <span class="comment"> * Check whether an error page is available.</span>
208
+ <a name="l00191"></a>00191 <span class="comment"> */</span>
209
+ <a name="l00192"></a><a class="code" href="classPassenger_1_1SpawnException.html#e65dc272e183fd9e5637a4091cc6bbf4">00192</a> <span class="keywordtype">bool</span> <a class="code" href="classPassenger_1_1SpawnException.html#e65dc272e183fd9e5637a4091cc6bbf4" title="Check whether an error page is available.">hasErrorPage</a>()<span class="keyword"> const </span>{
210
+ <a name="l00193"></a>00193 <span class="keywordflow">return</span> m_hasErrorPage;
211
+ <a name="l00194"></a>00194 }
212
+ <a name="l00195"></a>00195 <span class="comment"></span>
213
+ <a name="l00196"></a>00196 <span class="comment"> /**</span>
214
+ <a name="l00197"></a>00197 <span class="comment"> * Return the error page content.</span>
215
+ <a name="l00198"></a>00198 <span class="comment"> *</span>
216
+ <a name="l00199"></a>00199 <span class="comment"> * @pre hasErrorPage()</span>
217
+ <a name="l00200"></a>00200 <span class="comment"> */</span>
218
+ <a name="l00201"></a><a class="code" href="classPassenger_1_1SpawnException.html#6f675a37edd7070875d0744e7dd010a1">00201</a> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="classPassenger_1_1SpawnException.html#6f675a37edd7070875d0744e7dd010a1" title="Return the error page content.">getErrorPage</a>()<span class="keyword"> const </span>{
219
+ <a name="l00202"></a>00202 <span class="keywordflow">return</span> m_errorPage;
220
+ <a name="l00203"></a>00203 }
221
+ <a name="l00204"></a>00204 };
222
+ <a name="l00205"></a>00205 <span class="comment"></span>
223
+ <a name="l00206"></a>00206 <span class="comment">/**</span>
224
+ <a name="l00207"></a>00207 <span class="comment"> * The application pool is too busy and cannot fulfill a get() request.</span>
225
+ <a name="l00208"></a>00208 <span class="comment"> *</span>
226
+ <a name="l00209"></a>00209 <span class="comment"> * @ingroup Exceptions</span>
227
+ <a name="l00210"></a>00210 <span class="comment"> */</span>
228
+ <a name="l00211"></a><a class="code" href="classPassenger_1_1BusyException.html">00211</a> <span class="keyword">class </span><a class="code" href="classPassenger_1_1BusyException.html" title="The application pool is too busy and cannot fulfill a get() request.">BusyException</a>: <span class="keyword">public</span> exception {
229
+ <a name="l00212"></a>00212 <span class="keyword">private</span>:
230
+ <a name="l00213"></a>00213 <span class="keywordtype">string</span> msg;
231
+ <a name="l00214"></a>00214 <span class="keyword">public</span>:
232
+ <a name="l00215"></a>00215 <a class="code" href="classPassenger_1_1BusyException.html" title="The application pool is too busy and cannot fulfill a get() request.">BusyException</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;message): msg(message) {}
233
+ <a name="l00216"></a>00216 <span class="keyword">virtual</span> ~<a class="code" href="classPassenger_1_1BusyException.html" title="The application pool is too busy and cannot fulfill a get() request.">BusyException</a>() <span class="keywordflow">throw</span>() {}
234
+ <a name="l00217"></a>00217 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> msg.c_str(); }
235
+ <a name="l00218"></a>00218 };
236
+ <a name="l00219"></a>00219
237
+ <a name="l00220"></a>00220 } <span class="comment">// namespace Passenger</span>
238
+ <a name="l00221"></a>00221
239
+ <a name="l00222"></a>00222 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_EXCEPTIONS_H_ */</span>
239
240
  </pre></div></div>
240
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Dec 5 13:53:01 2008 for Passenger by&nbsp;
241
+ <hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 15 15:27:24 2008 for Passenger by&nbsp;
241
242
  <a href="http://www.doxygen.org/index.html">
242
243
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
243
244
  </body>