lpython icon indicating copy to clipboard operation
lpython copied to clipboard

issue:2481 - Unhandled Exception on non-existent file

Open juliazhorniakAMI opened this issue 1 year ago • 4 comments

This modification will print a specific error message ("Error: The input file does not exist") and exit with a return code of 1 if the input file doesn't exist. It catches any other exceptions thrown during the execution and prints their error message as well. Make sure to replace "your existing code here" with the relevant parts of your program.

juliazhorniakAMI avatar Apr 05 '24 07:04 juliazhorniakAMI

Hello @juliazhorniakAMI! Welcome to LPython.

We already have a mechanism for detecting non-existent input files and catching errors at runtime. Could you please be more specific regarding what the PR changes? I feel this might be redundant.

kmr-srbh avatar Apr 05 '24 08:04 kmr-srbh

@juliazhorniakAMI Thanks for this. Could you share which specific error/issue this change fixes? Sharing an example lpython code would be helpful.

ubaidsk avatar Apr 08 '24 17:04 ubaidsk

Thanks for working on this @juliazhorniakAMI! I shared a query above. I am marking this as draft for now. Please mark "Ready for review" when ready.

ubaidsk avatar Apr 11 '24 05:04 ubaidsk

@Shaikh-Ubaid , this PR was meant to be a fix for #2481, but that was fixed by #2536. The issue is open till now though.

kmr-srbh avatar Apr 11 '24 11:04 kmr-srbh