Browse Source

DirectoryNotFoundException

Krzysztof Krysiński 1 year ago
parent
commit
84e451d653

+ 6 - 1
src/PixiEditor.AvaloniaUI/Models/IO/Importer.cs

@@ -84,7 +84,7 @@ internal class Importer : ObservableObject
         try
         {
             var doc = PixiParser.Deserialize(path).ToDocument();
-            
+
             if (associatePath)
             {
                 doc.FullFilePath = path;
@@ -92,6 +92,11 @@ internal class Importer : ObservableObject
 
             return doc;
         }
+        catch (DirectoryNotFoundException)
+        {
+            //TODO: Handle
+            throw new RecoverableException();
+        }
         catch (InvalidFileException)
         {
             try

+ 1 - 1
src/WasmSampleExtension/ButtonTextElementState.cs

@@ -11,7 +11,7 @@ public class ButtonTextElementState : State
     {
         return new Button(
             onClick: OnClick,
-            child: new Text($"Hot hot hot: {ClickedTimes}"));
+            child: new Text($"Clicked: {ClickedTimes} times"));
     }
 
     private void OnClick(ElementEventArgs args)