3 ms·
The issue is that the library can't know what state the program is running in, since it's a library... it has a job to perform some crypto functionality and it
by blub 8y ago
The issue is that the library can't know what state the program is running in, since it's a library... it has a job to perform some crypto functionality and it can only either return a result or an error for that particular operation.
When libraries start calling abort out of the blue it's like the janitor deciding to send everyone home for the day because their mop broke. It's not their call to make :)
Panicking or any other error handling mechanism which permits the main application to decide how to continue is perfectly fine.
- adwn 8y ago> When libraries start calling abort out of the blue it's like the janitor deciding to send everyone home for the day because their mop broke. A more apt analogy would be the janitor that pulls the fire alarm because they saw smoke coming out of the boiler room. So yes, it's their call to make, and it would be the right call. Besides, as lifthrasiir points out, you can isolate this behavior in Rust, akin to triggering the fire alarm for a single building, but not for the entire complex.