OpenStitching / stitching

A Python package for fast and robust Image Stitching
Apache License 2.0
2.11k stars 162 forks source link

Add error codes to StitchingError #122

Closed Luthics closed 1 year ago

Luthics commented 1 year ago

I distinguish the error and warning in the program in detail, so that my program can accurately capture errors and warnings and give feedback to the user.

Even though I don't change anything, unittest still throws an error and I don't know why.

This PR adds: Errors:

Warnings:

lukasalexanderweber commented 1 year ago

you mean that you need more detailed information on where a StitchingError/Warning occur?

Luthics commented 1 year ago

you mean that you need more detailed information on where a StitchingError/Warning occur?

yeah.

I want to use stitching as the backend of an image processing website, so I want to capture more detailed errors and warnings for user feedback.

lukasalexanderweber commented 1 year ago

while I understand that this information is important, I don't like the idea of creating a new Error for each possible exception. We could maybe introduce error codes so you know better what failed as e.g. in https://stackoverflow.com/questions/6180185/custom-python-exceptions-with-error-codes-and-error-messages

Luthics commented 1 year ago

while I understand that this information is important, I don't like the idea of creating a new Error for each possible exception. We could maybe introduce error codes so you know better what failed as e.g. in https://stackoverflow.com/questions/6180185/custom-python-exceptions-with-error-codes-and-error-messages

Compared to create a new Error for each possible exception, using error code is more elegant, I will optimize my code.

I'm a beginner, thanks for your advice!!!

lukasalexanderweber commented 1 year ago

@Luthics are you still working this or can we close the PR?

Luthics commented 1 year ago

@Luthics are you still working this or can we close the PR?

I'm sorry for taking up so long, my college has started, there are more things, I try to finish it in this week.

lukasalexanderweber commented 1 year ago

We don't really need this, so only continue if its important to you