Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

feat: show error on unreadable .alva files #542

Merged
merged 10 commits into from
Jun 12, 2018
Merged

Conversation

tilmx
Copy link
Member

@tilmx tilmx commented Jun 10, 2018

Catches an file-opening error and lets the user know what happened.

Todo

  • Show Error when file is too old and has missing stuff
  • Show Error when a completely false file is opened (e.g. rename .sketch to .alva and try to open)

Should be squashed into feat: show error on unreadable .alva files

@tilmx tilmx requested a review from marionebl June 10, 2018 08:11
@tilmx tilmx changed the title feat: show error on unreadable .alva files WIP feat: show error on unreadable .alva files Jun 10, 2018
@tilmx tilmx changed the title WIP feat: show error on unreadable .alva files feat: show error on unreadable .alva files Jun 10, 2018
@tilmx tilmx requested a review from lkuechler June 10, 2018 11:25
@@ -91,7 +91,10 @@ const userStore = new ElectronStore();
const result = await Persistence.read<Types.SavedProject>(pathToOpen);

if (result.state === PersistenceState.Error) {
// TODO: Show user facing error here
dialog.showErrorBox(
'We run into a problem!',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run => ran

@tilmx
Copy link
Member Author

tilmx commented Jun 10, 2018

Fixed the typo @marionebl!

// TODO: Show user facing error here
dialog.showErrorBox(
'We ran into a problem!',
'Sorry, we had trouble while opening that file. It may help to update your version of Alva.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change to Sorry, we had trouble while opening the file ${pathToOpen}. I'd discard the second part of the message because we'll be capable of detecting version mismatches in the future reliably (see #447)

@tilmx tilmx changed the title feat: show error on unreadable .alva files WIP feat: show error on unreadable .alva files Jun 10, 2018
@tilmx tilmx changed the title WIP feat: show error on unreadable .alva files feat: show error on unreadable .alva files Jun 10, 2018
marionebl
marionebl previously approved these changes Jun 12, 2018
@marionebl marionebl merged commit 0510893 into master Jun 12, 2018
@marionebl marionebl deleted the feat/show-file-error branch June 12, 2018 21:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants