Changeset 27c3a93 for perlconfig.c


Ignore:
Timestamp:
Oct 17, 2003, 8:55:32 PM (21 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
2a2bb60
Parents:
b4db911
Message:
2.0.9-pre-2
	Better reporting of perl errors (both into the errqueue
	        and also clearing the error after displaying it).
	Allow default_style to be specified in config.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rf1e629d r27c3a93  
    121121  if (SvTRUE(ERRSV)) {
    122122    STRLEN n_a;
    123     owl_function_makemsg("Perl Error: '%s'", SvPV(ERRSV, n_a));
     123    owl_function_error("Perl Error: '%s'", SvPV(ERRSV, n_a));
     124    /* and clear the error */
     125    sv_setsv (ERRSV, &PL_sv_undef);
    124126  }
    125127
     
    178180  if (ret || SvTRUE(ERRSV)) {
    179181    STRLEN n_a;
    180     return owl_strdup(SvPV(ERRSV, n_a));
     182    char *err;
     183    err = owl_strdup(SvPV(ERRSV, n_a));
     184    sv_setsv (ERRSV, &PL_sv_undef);     /* and clear the error */
     185    return err;
    181186  }
    182187
     
    184189  if (ret || SvTRUE(ERRSV)) {
    185190    STRLEN n_a;
    186     return owl_strdup(SvPV(ERRSV, n_a));
     191    char *err;
     192    err = owl_strdup(SvPV(ERRSV, n_a));
     193    sv_setsv (ERRSV, &PL_sv_undef);     /* and clear the error */
     194    return err;
    187195  }
    188196
     
    207215  if (SvTRUE(ERRSV)) {
    208216    STRLEN n_a;
    209     return owl_strdup(SvPV(ERRSV, n_a));
     217    char *err;
     218    err = owl_strdup(SvPV(ERRSV, n_a));
     219    sv_setsv (ERRSV, &PL_sv_undef);     /* and clear the error */
     220    return err;
    210221  }
    211222
     
    257268  if (SvTRUE(ERRSV)) {
    258269    STRLEN n_a;
    259     owl_function_makemsg("Perl Error: '%s'", SvPV(ERRSV, n_a));
     270    owl_function_error("Perl Error: '%s'", SvPV(ERRSV, n_a));
     271    sv_setsv (ERRSV, &PL_sv_undef);     /* and clear the error */
    260272  }
    261273
Note: See TracChangeset for help on using the changeset viewer.