Changeset 121


Ignore:
Timestamp:
Apr 29, 2008, 10:26:48 AM (11 years ago)
Author:
cameron
Message:

Additional error messages to stderr.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/markup_stats.cxx

    r120 r121  
    146146        error_item_count +=1;
    147147        error_item_length += lgth;
    148         printf("Error: illegal markup at positions %i of length %i.\n", AbsPos()-lgth, lgth);
     148        fprintf(stderr, "Error: illegal markup at positions %i of length %i.\n", AbsPos()-lgth, lgth);
    149149        cout << string((char *) item, lgth) << endl;
    150150}
  • trunk/src/xml_error.c

    r120 r121  
    1111        if (errCode < vErr_vc_roottype) {
    1212                fprintf(stderr, "Violation of well-formedness constraint: %s\n", XML_Constraint_Strings[errCode]);
     13                exit(-1);
    1314        }
    1415        else fprintf(stderr, "Violation of validity constraint: %s\n", XML_Constraint_Strings[errCode]);
     
    2728void EncodingError(char * msg, unsigned char * encoding, int lgth) {
    2829        fprintf(stderr, "Error : Illegal/unsupported %s encoding of length %i: \"", msg, lgth);
    29         for (int i = 0; i < lgth; i++) printf("%c", encoding[i]);
    30         printf("\"\n");
     30        for (int i = 0; i < lgth; i++) fprintf(stderr, "%c", encoding[i]);
     31        fprintf(stderr, "\"\n");
    3132        exit(-1);
    3233}
Note: See TracChangeset for help on using the changeset viewer.