scarpe-team / scarpe

Scarpe - shoes but running on webview
Other
163 stars 28 forks source link

Inconsistent naming of Shoes errors #474

Closed noahgibbs closed 9 months ago

noahgibbs commented 11 months ago

The word "Error" is at the end of most shoes errors... but not UnregisteredShoesEvent. We go back and forth between NoSuchStyleError, NoSuchItemListError and NoLinkableIdError (instead of NoSuchLinkableIdError.)

The ones that don't match should have their names fixed in lacci/lib/shoes/errors.rb, but also where the errors can be thrown.

Nj221102 commented 9 months ago

Hi, @noahgibbs

In this issue, I should  1.⁠ ⁠change every error name that doesn’t end with a word "error "  2.⁠ ⁠⁠merge NoSuchStyleError, NoSuchItemListError and NoLinkableIdError into a single error called NoSuchLinkableIdError.

Am I correct

noahgibbs commented 9 months ago

You're right about point 1. For point 2, no. In this case we have three errors for "something wasn't found." Two are NoSuchWhateverError while the third is NoWhateverError.

So either NoLinkableIdError should be NoSuchLinkableIdError, or the word "Such" should be removed from the other two.

Nj221102 commented 9 months ago

You're right about point 1. For point 2, no. In this case we have three errors for "something wasn't found." Two are NoSuchWhateverError while the third is NoWhateverError.

So either NoLinkableIdError should be NoSuchLinkableIdError, or the word "Such" should be removed from the other two.

thanks, will start working on it.

noahgibbs commented 9 months ago

This fixes the error names that I had seen. We could rename others if anybody has improvements, but this handles my personal worries :-)