-
Notifications
You must be signed in to change notification settings - Fork 265
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
[WIP] Improving error handling messages for Custom Functions #1330
[WIP] Improving error handling messages for Custom Functions #1330
Conversation
FileNotFoundError modified: evadb/utils/generic_utils.py
modified: evadb/utils/generic_utils.py
Hey @pchunduri6 @jarulraj, have added a couple of types of exceptions. Do let me know if there are other exceptions that we have to raise in difference places, will take care of that in this repository and add the tests as well |
Error messages LGTM. Can you check the failed test cases? |
Both the linter and the short integration test issues seem not to be linked to this issue in particular. I'll fix them nonetheless |
…ode) modified: evadb/binder/function_expression_binder.py modified: test/integration_tests/short/test_select_executor.py
@hershd23 Have we already added unit test cases with functions with specifically these errors -- a function with only a module error and a function with only a file not found error and one with both errors? |
FileNotFound - The existing short integration test was infact FileNotFound error |
Hi @hershd23, you can define a function with error in the test file. And try to import that function. For my education, when is |
makes more sense. Will add tests for both the cases modified: evadb/utils/generic_utils.py
modified: evadb/utils/generic_utils.py modified: test/integration_tests/short/test_generic_utils.py
@pchunduri6 @jarulraj this is up for a review, docs is failing for some reason have reported the issue. Other than that good enough to review |
@hershd23 Can we add test cases for a |
@@ -50,17 +51,27 @@ def test_should_return_correct_class_for_path_without_classname(self): | |||
assert vl.__qualname__ == DecordReader.__qualname__ | |||
|
|||
def test_should_raise_on_missing_file(self): | |||
with self.assertRaises(RuntimeError): | |||
# Asserting on the error message, but that's brittle | |||
with self.assertRaises(FileNotFoundError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FileNotFoundError
test case is already there prof @jarulraj
Already added prof @jarulraj |
Added separate error handling for ModuleNotFoundError and FileNotFoundError
modified: evadb/utils/generic_utils.py