~ubuntu-branches/ubuntu/trusty/schroot/trusty

« back to all changes in this revision

Viewing changes to sbuild/sbuild-custom-error.h

  • Committer: Bazaar Package Importer
  • Author(s): Roger Leigh
  • Date: 2009-11-07 10:46:54 UTC
  • mfrom: (1.1.20 upstream) (2.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091107104654-kk1fp1icv8dzfyfi
* New upstream development release.
* schroot:
  - Return success when ending a session and the operation
    succeeded (Closes: #554907).

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
     * @param error the error code.
42
42
     */
43
43
    custom_error (error_type error):
44
 
      sbuild::error<T>(format_error(null(), null(), null(), error, null(), null()),
45
 
                       format_reason(null(), null(), null(), error, null(), null()))
 
44
      sbuild::error<T>(format_error(null(), null(), null(), error, null(), null(), null()),
 
45
                       format_reason(null(), null(), null(), error, null(), null(), null()))
46
46
    {
47
47
    }
48
48
 
55
55
    template<typename C>
56
56
    custom_error (C const&   context,
57
57
                  error_type error):
58
 
      sbuild::error<T>(format_error(context, null(), null(), error, null(), null()),
59
 
                       format_reason(context, null(), null(), error, null(), null()))
 
58
      sbuild::error<T>(format_error(context, null(), null(), error, null(), null(), null()),
 
59
                       format_reason(context, null(), null(), error, null(), null(), null()))
60
60
    {
61
61
    }
62
62
 
69
69
    template<typename D>
70
70
    custom_error (error_type error,
71
71
                  D const&   detail):
72
 
      sbuild::error<T>(format_error(null(), null(), null(), error, detail, null()),
73
 
                       format_reason(null(), null(), null(), error, detail, null()))
 
72
      sbuild::error<T>(format_error(null(), null(), null(), error, detail, null(), null()),
 
73
                       format_reason(null(), null(), null(), error, detail, null(), null()))
74
74
    {
75
75
    }
76
76
 
85
85
    custom_error (error_type error,
86
86
                  D const&   detail,
87
87
                  E const&   detail2):
88
 
      sbuild::error<T>(format_error(null(), null(), null(), error, detail, detail2),
89
 
                       format_reason(null(), null(), null(), error, detail, detail2))
 
88
      sbuild::error<T>(format_error(null(), null(), null(), error, detail, detail2, null()),
 
89
                       format_reason(null(), null(), null(), error, detail, detail2, null()))
 
90
    {
 
91
    }
 
92
 
 
93
    /**
 
94
     * The constructor.
 
95
     *
 
96
     * @param error the error code.
 
97
     * @param detail the details of the error.
 
98
     * @param detail2 additional details of the error.
 
99
     * @param detail3 additional details of the error.
 
100
     */
 
101
    template<typename D, typename E, typename F>
 
102
    custom_error (error_type error,
 
103
                  D const&   detail,
 
104
                  E const&   detail2,
 
105
                  F const&   detail3):
 
106
      sbuild::error<T>(format_error(null(), null(), null(), error, detail, detail2, detail3),
 
107
                       format_reason(null(), null(), null(), error, detail, detail2, detail3))
90
108
    {
91
109
    }
92
110
 
101
119
    custom_error (C const&   context,
102
120
                  error_type error,
103
121
                  D const&   detail):
104
 
      sbuild::error<T>(format_error(context, null(), null(), error, detail, null()),
105
 
                       format_reason(context, null(), null(), error, detail, null()))
 
122
      sbuild::error<T>(format_error(context, null(), null(), error, detail, null(), null()),
 
123
                       format_reason(context, null(), null(), error, detail, null(), null()))
106
124
    {
107
125
    }
108
126
 
119
137
                  error_type error,
120
138
                  D const&   detail,
121
139
                  E const&   detail2):
122
 
      sbuild::error<T>(format_error(context, null(), null(), error, detail, detail2),
123
 
                       format_reason(context, null(), null(), error, detail, detail2))
 
140
      sbuild::error<T>(format_error(context, null(), null(), error, detail, detail2, null()),
 
141
                       format_reason(context, null(), null(), error, detail, detail2, null()))
124
142
    {
125
143
    }
126
144
 
137
155
                  D const&   context2,
138
156
                  error_type error,
139
157
                  E const&   detail):
140
 
      sbuild::error<T>(format_error(context1, context2, null(), error, detail, null()),
141
 
                       format_reason(context1, context2, null(), error, detail, null()))
 
158
      sbuild::error<T>(format_error(context1, context2, null(), error, detail, null(), null()),
 
159
                       format_reason(context1, context2, null(), error, detail, null(), null()))
142
160
    {
143
161
    }
144
162
 
157
175
                  error_type error,
158
176
                  E const&   detail,
159
177
                  F const&   detail2):
160
 
      sbuild::error<T>(format_error(context1, context2, null(), error, detail, detail2),
161
 
                       format_reason(context1, context2, null(), error, detail, detail2))
 
178
      sbuild::error<T>(format_error(context1, context2, null(), error, detail, detail2, null()),
 
179
                       format_reason(context1, context2, null(), error, detail, detail2, null()))
162
180
    {
163
181
    }
164
182
 
168
186
     * @param error the error.
169
187
     */
170
188
    custom_error (std::runtime_error const& error):
171
 
      sbuild::error<T>(sbuild::error<T>::format_error(null(), null(), null(), error, null(), null()),
172
 
                       sbuild::error<T>::format_reason(null(), null(), null(), error, null(), null()))
 
189
      sbuild::error<T>(sbuild::error<T>::format_error(null(), null(), null(), error, null(), null(), null()),
 
190
                       sbuild::error<T>::format_reason(null(), null(), null(), error, null(), null(), null()))
173
191
    {
174
192
    }
175
193
 
179
197
     * @param error the error.
180
198
     */
181
199
    custom_error (error_base const& error):
182
 
      sbuild::error<T>(sbuild::error<T>::format_error(null(), null(), null(), error, null(), null()),
183
 
                       sbuild::error<T>::format_reason(null(), null(), null(), error, null(), null()))
 
200
      sbuild::error<T>(sbuild::error<T>::format_error(null(), null(), null(), error, null(), null(), null()),
 
201
                       sbuild::error<T>::format_reason(null(), null(), null(), error, null(), null(), null()))
184
202
    {
185
203
    }
186
204
 
193
211
    template<typename C>
194
212
    custom_error (C const&                  context,
195
213
                  std::runtime_error const& error):
196
 
      sbuild::error<T>(sbuild::error<T>::format_error(context, null(), null(), error, null(), null()),
197
 
                       sbuild::error<T>::format_reason(context, null(), null(), error, null(), null()))
 
214
      sbuild::error<T>(sbuild::error<T>::format_error(context, null(), null(), error, null(), null(), null()),
 
215
                       sbuild::error<T>::format_reason(context, null(), null(), error, null(), null(), null()))
198
216
    {
199
217
    }
200
218
 
207
225
    template<typename C>
208
226
    custom_error (C const&          context,
209
227
                  error_base const& error):
210
 
      sbuild::error<T>(sbuild::error<T>::format_error(context, null(), null(), error, null(), null()),
211
 
                       sbuild::error<T>::format_reason(context, null(), null(), error, null(), null()))
 
228
      sbuild::error<T>(sbuild::error<T>::format_error(context, null(), null(), error, null(), null(), null()),
 
229
                       sbuild::error<T>::format_reason(context, null(), null(), error, null(), null(), null()))
212
230
    {
213
231
    }
214
232