Changeset 80ae121 for libcfa/src


Ignore:
Timestamp:
Aug 31, 2021, 1:49:09 AM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
6604ea1
Parents:
e54654e
git-author:
Jacob Prud'homme <jafprudhomme@…> (07/16/21 15:35:11)
git-committer:
Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:09)
Message:

Added exception that will be used to signal failed validation

Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    re54654e r80ae121  
    22#include <parseargs.hfa>
    33#include "parseconfig.hfa"
     4
     5
     6// *********************************** exceptions ***********************************
     7
     8
     9EHM_VIRTUAL_TABLE(Validation_Failure, Validation_Failure_main_table);
     10void ?{}( Validation_Failure & this, config_entry & entry ) with ( entry ) {
     11        this.virtual_table = &Validation_Failure_main_table;
     12        this.key = key;
     13        this.variable = variable;
     14}
     15void throwValidation_Failure( config_entry & entry ) {
     16        Validation_Failure exc = { entry };
     17}
     18
     19
     20// *********************************** main code ***********************************
     21
    422
    523struct KVPairs {
  • libcfa/src/parseconfig.hfa

    re54654e r80ae121  
    11#pragma once
     2
     3
     4// *********************************** exceptions ***********************************
     5
     6
     7EHM_EXCEPTION(Validation_Failure)(
     8        const char * key;
     9        void * variable;
     10);
     11
     12void ?{}( Validation_Failure & this, config_entry & entry );
     13
     14
     15// *********************************** main code ***********************************
     16
    217
    318struct config_entry {
Note: See TracChangeset for help on using the changeset viewer.