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

[UI] [Error] Unable to find image file during export #36

Closed
jcoliz opened this issue Jul 8, 2024 · 0 comments
Closed

[UI] [Error] Unable to find image file during export #36

jcoliz opened this issue Jul 8, 2024 · 0 comments

Comments

@jcoliz
Copy link
Owner

jcoliz commented Jul 8, 2024

Given: Loaded into UI a TOML file with a logo that points to a non-existing file (see issue-20.toml)
When: Export
Then: (Currently) Fails silently, logs an exception
Expected: Display an error to user

Logs:

[17:30:19 ERR] Export: Failed
System.ApplicationException: Unable to load image smiley.png
 ---> System.IO.FileNotFoundException: Could not find file 'C:\Source\jcoliz\LogoSlideMaker\LogoSlideMaker.WinUi\Sample\smiley.png'.
File name: 'C:\Source\jcoliz\LogoSlideMaker\LogoSlideMaker.WinUi\Sample\smiley.png'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.OpenRead(String path)
   at LogoSlideMaker.Export.ImageCache.LoadImageAsync(String filename)
   at LogoSlideMaker.Export.ImageCache.LoadAsync(String path)
   --- End of inner exception stack trace ---
   at LogoSlideMaker.Export.ImageCache.LoadAsync(String path)
   at LogoSlideMaker.Export.ImageCache.LoadAsync(IEnumerable`1 paths)
   at LogoSlideMaker.Export.ExportPipeline.LoadAndMeasureAsync(String basePath)
   at LogoSlideMaker.WinUi.ViewModels.MainViewModel.ExportToAsync(String outPath)
   at LogoSlideMaker.WinUi.MainWindow.DoExport_Click(Object _, RoutedEventArgs __)
@jcoliz jcoliz closed this as completed in 630103d Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant