Changeset a75cd3d


Ignore:
Timestamp:
Aug 31, 2021, 11:38:43 AM (5 months ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
jacob/cs343-translation, master
Children:
692db791
Parents:
dcf792a
Message:

Added message function for exceptions I've created

Also removed constructor declarations from header file, as they are unnecessary

Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    rdcf792a ra75cd3d  
    1616}
    1717
     18void msg( Missing_Config_Entries * ex ) {
     19        serr | "The config file is missing " | ex->num_missing | " entries";
     20}
     21
    1822
    1923static vtable(Parse_Failure) Parse_Failure_vt;
     
    3337}
    3438
     39void msg( Parse_Failure * ex ) {
     40        serr | "Config entry " | ex->failed_key | " could not be parsed. It has value " | ex->failed_value | ".";
     41}
     42
    3543
    3644static vtable(Validation_Failure) Validation_Failure_vt;
     
    4957        free( failed_value );
    5058}
     59
     60void msg( Validation_Failure * ex ) {
     61        serr | "Config entry " | ex->failed_key | " could not be validated. It has value " | ex->failed_value | ".";
    5162}
    5263
  • libcfa/src/parseconfig.hfa

    rdcf792a ra75cd3d  
    6262};
    6363
    64 void ?{}( Missing_Config_Entries & this );
     64void msg( Missing_Config_Entries * ex );
    6565
    6666exception Parse_Failure {
     
    6969};
    7070
    71 void ?{}( Parse_Failure & this );
     71void msg( Parse_Failure * ex );
    7272
    7373exception Validation_Failure {
     
    7676};
    7777
    78 void ?{}( Validation_Failure & this );
     78void msg( Validation_Failure * ex );
    7979
    8080
Note: See TracChangeset for help on using the changeset viewer.