finixbit / elf-parser

Lightweight elf binary parser with no external dependencies - Sections, Symbols, Relocations, Segments
MIT License
250 stars 44 forks source link

don't exit() on error #6

Open darealshinji opened 3 years ago

darealshinji commented 3 years ago

Instead of calling exit() on an error, can't you just set a flag or something and leave it up to the programmer to decide what to do? Something like this:

elf_parser::Elf_parser elf_parser(file);
if (!elf_parser.success()) return 1;