pumpkin icon indicating copy to clipboard operation
pumpkin copied to clipboard

Rather than panicking when an error occurs, all functions should return a Result enum

Open zcdziura opened this issue 8 years ago • 0 comments

Good library design dictates that the library itself should never panic. Instead, it should return meaningful error messages, allowing the user the control over what should happen to their program. Currently, should the user give bad inputs, the various prime generation functions panic!. Instead, they should return some type of Result.

zcdziura avatar Jun 01 '16 04:06 zcdziura