Re: RuntimeError, or user defined exception

2022-02-04 Thread Cameron Simpson
On 04Feb2022 21:39, Cecil Westerhof wrote: >I am creating a class that will call a user defined function on user >defined intervals. In my opinion it is an error when the function >takes more as 10% of interval, or more as half a second. What is >better: just using RuntimeError, or creating two

RuntimeError, or user defined exception

2022-02-04 Thread Cecil Westerhof via Python-list
I am creating a class that will call a user defined function on user defined intervals. In my opinion it is an error when the function takes more as 10% of interval, or more as half a second. What is better: just using RuntimeError, or creating two exception classes for this? -- Cecil Westerhof