Use exception handling paradigm for consistency

Adopting exception handling paradigm in the events/migration classes
For readability, I suggest replacing the numeric return codes with references to the exitCode dictionary.