diff options
author | Damiano Galassi <[email protected]> | 2015-10-10 12:19:22 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2015-10-10 21:50:26 +0200 |
commit | 656c08b79b68553b721dc07fe7856e78f4086c7c (patch) | |
tree | 9f649893ac4deea085df6ce3bec802e7fa03ba4d /macosx/HBPresetsViewController.m | |
parent | f5fb3073f913110139fb28491af0807c7dab60af (diff) |
MacGui: show better error message to the user if a preset fails to import
Diffstat (limited to 'macosx/HBPresetsViewController.m')
-rw-r--r-- | macosx/HBPresetsViewController.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/macosx/HBPresetsViewController.m b/macosx/HBPresetsViewController.m index d58cb6715..fd8bc9677 100644 --- a/macosx/HBPresetsViewController.m +++ b/macosx/HBPresetsViewController.m @@ -135,7 +135,14 @@ for (NSURL *url in panel.URLs) { - HBPreset *import = [[HBPreset alloc] initWithContentsOfURL:url]; + NSError *error; + HBPreset *import = [[HBPreset alloc] initWithContentsOfURL:url error:&error]; + + if (import == nil) + { + [self presentError:error]; + } + for (HBPreset *child in import.children) { [self.presets addPreset:child]; |