Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let libtau thtows an exception if a source depth is negative #110

Closed
luca-s opened this issue Sep 15, 2023 · 3 comments
Closed

Let libtau thtows an exception if a source depth is negative #110

luca-s opened this issue Sep 15, 2023 · 3 comments

Comments

@luca-s
Copy link
Contributor

luca-s commented Sep 15, 2023

Dear developers,

I have been thinking at this check here and I do not believe it is a good idea to hide problems. I would rather prefer the travel time table to throw an exception and let the caller decide what it is the best way to handle it. Trying to cope with a bad input is usually not the best approach for an api. It is normally better to communicate the error and let the caller address the issue in the most appropriate way since it is the caller that knows better.

What do you think?

Luca

@gempa-jabe
Copy link
Contributor

Have you tried to remove that line and does everything still work? I am actually fine with removing that line and maybe @jsaul can comment on it as well.

@luca-s
Copy link
Contributor Author

luca-s commented Sep 18, 2023

My plan is to properly test the removal if you accept to remove it :)

@luca-s
Copy link
Contributor Author

luca-s commented Sep 22, 2023

I have been thinking again about it and it doesn't matter to change this behaviour, even though I do not like it. libtau is strongly coupled with scautoloc and I don't want to introduce unwanted behaviour in scautoloc. Thanks for considering this issue anyway.

@luca-s luca-s closed this as completed Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants