cleo icon indicating copy to clipboard operation
cleo copied to clipboard

Rename custom exceptions form *Exception to *Error

Open Secrus opened this issue 3 years ago • 2 comments

Resolves: #162

Secrus avatar Jul 16 '22 13:07 Secrus

nb this is a breaking change.

If you're going to make breaking changes, it's worth considering more cleanup than this.

  • Some but not all of these begin Cleo, consistency would be desirable
  • especially RuntimeError, which collides with the builtin RuntimeError, that's asking for mistakes.
  • What do RuntimeError and CleoValueError mean that is different from the builtin RuntimeError and ValueError?
  • What's the difference between a RuntimeError and a LogicError?
  • What's a CleoSimpleError? in what sense are some of these simple and others not?
  • and so on

I realise that you were likely just looking to do a small tidy-up and not get into all this. But breaking changes should be rare: and if you're going to make breaking changes anyway, then that's the opportunity to make such improvements.

dimbleby avatar Jul 17 '22 14:07 dimbleby

nb this is a breaking change.

If you're going to make breaking changes, it's worth considering more cleanup than this.

  • Some but not all of these begin Cleo, consistency would be desirable
  • especially RuntimeError, which collides with the builtin RuntimeError, that's asking for mistakes.
  • What do RuntimeError and CleoValueError mean that is different from the builtin RuntimeError and ValueError?
  • What's the difference between a RuntimeError and a LogicError?
  • What's a CleoSimpleError? in what sense are some of these simple and others not?
  • and so on

I realise that you were likely just looking to do a small tidy-up and not get into all this. But breaking changes should be rare: and if you're going to make breaking changes anyway, then that's the opportunity to make such improvements.

Thanks for your input, I appreciate it. I will look into what you pointed out. I am aware that those are breaking changes, but as far as I know, the next release is gonna be 1.0.0 which could be a good point to introduce such changes, especially since we are working towards better code quality with more flake8 checks and the introduction of type checking via mypy.

Secrus avatar Jul 17 '22 15:07 Secrus