mcic20 / text_file_to_ui

0 stars 0 forks source link

Catch exceptions #6

Open mislavmatijevic opened 1 year ago

mislavmatijevic commented 1 year ago

[I KNOW this wasn't in the task, but I figured you're motivated, so here goes nothing] When I load a file that doesn't have a predefined structure, an exception is thrown that crashes the program.

image

Try to catch it and handle it. My suggestion is an Error MessageBox. Before you start coding, follow the following steps:

  1. Create a new Git branch called fix/corrupt_file_parsing_crash.
  2. Commit to THAT branch and use this issue's ID.
  3. Push the branch and create a Pull request here on GitHub (the top bar, next to "Code, Issues").
  4. Wait for me to comment.
  5. Afterwards merge the PR.
mcic20 commented 1 year ago

Implementirano je try/catch, u kodu imam "#if DEBUG" jer mi debug mode prekida izvođenje programa, a program s disable tog exceptiona radi normalno, no ja sam ručno onemogućio to pa ne znam radi li sa time.