pobrn / mktorrent

A simple command line utility to create BitTorrent metainfo files
Other
472 stars 73 forks source link

Utility function for handling fatal errors #41

Closed uno20001 closed 4 years ago

uno20001 commented 4 years ago

This pull requests introduces a new function (fatal()), and two macros (FATAL_IF(), and FATAL_IF0()) which can be used to (conditionally in the case of the macros) print a formatted error message that's prefixed with fatal error: and exit the program with EXIT_FAILURE status code. The error messages have also been rewritten to some degree and converted to lower case.