~ubuntu-branches/debian/squeeze/glib2.0/squeeze

« back to all changes in this revision

Viewing changes to glib/gerror.c

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mfrom: (1.3.1 upstream) (69.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20090215130043-q47fbt3owmt42m2f
Tags: 2.18.4-2
* Release to unstable
* debian/rules:
- bump SHVER, since we are already forcing a 2.18.0 dependecy on the
  symbols introduced in the development versions
* debian/control.in:
- added Homepage and Vcs-* control fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
}
213
213
 
214
214
/**
 
215
 * g_set_error_literal:
 
216
 * @err: a return location for a #GError, or %NULL
 
217
 * @domain: error domain
 
218
 * @code: error code 
 
219
 * @message: error message
 
220
 *
 
221
 * Does nothing if @err is %NULL; if @err is non-%NULL, then *@err must
 
222
 * be %NULL. A new #GError is created and assigned to *@err.
 
223
 * Unlike g_set_error(), @message is not a printf()-style format string.
 
224
 * Use this function if @message contains text you don't have control over,
 
225
 * that could include printf() escape sequences.
 
226
 *
 
227
 * Since: 2.18
 
228
 **/
 
229
void
 
230
g_set_error_literal (GError      **err,
 
231
                     GQuark        domain,
 
232
                     gint          code,
 
233
                     const gchar  *message)
 
234
{
 
235
  GError *new;
 
236
  
 
237
  if (err == NULL)
 
238
    return;
 
239
 
 
240
  new = g_error_new_literal (domain, code, message);
 
241
  if (*err == NULL)
 
242
    *err = new;
 
243
  else
 
244
    g_warning (ERROR_OVERWRITTEN_WARNING, new->message);    
 
245
}
 
246
 
 
247
/**
215
248
 * g_propagate_error:
216
249
 * @dest: error return location
217
250
 * @src: error to move into the return location