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

Display of errors #44

Closed
anufrievroman opened this issue Feb 24, 2023 · 3 comments
Closed

Display of errors #44

anufrievroman opened this issue Feb 24, 2023 · 3 comments
Labels
Feature request New feature or request

Comments

@anufrievroman
Copy link
Owner

Need to implement a system to propagate errors and display to the user.
For instance, if some of the files were not loaded, there should be a message to the user or at the very least a log file.

@anufrievroman anufrievroman added the Feature request New feature or request label Feb 24, 2023
@nfultz
Copy link
Contributor

nfultz commented Feb 24, 2023

I noticed this when in the codebase yesterday playing with ICS config.

  • first step is to replace print()s at
    except Exception:
    ERR_FILE1 = "Looks like there is a problem in your config.ini file. Perhaps you edited it and entered a wrong line."
    ERR_FILE2 = "Try removing your config.ini file and run the program again, it will create a fresh working config file."
    print(ERR_FILE1)
    print(ERR_FILE2)
    exit()
  • Also would be nice to (optionally) log exception and stack trace.

See also https://docs.python.org/3/howto/logging.html

@anufrievroman
Copy link
Owner Author

Implemented 020aa70 basic logging of errors and warning into log file and console.
In the future, should also display the errors in curses interface, at least after the start of the app, or maybe just a message like "Errors occurred, see info.log file".

@anufrievroman
Copy link
Owner Author

Commit 868c3ea adds display of error notification in curses interface.
So the issue is resolved. Maybe later the errors could be summarized more explicitly. Maybe I'll also introduce the same notification for incorrect input from the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants