[ASCII] Fix/improve the error message "Failed to open the device/file or it's empty."
Requirements
-
I searched through the issues if the issue already exists
There're multiple issues with and related to this error message:
-
In the flatpack build, the preview of the file to be imported works fine, the import itself triggers this error message - https://discuss.kde.org/t/the-text-file-with-the-table-is-not-imported-in-labplot2/19643/13 -
We need to improve this error message, which is too generic at the moment and not really actionable for the user. -
In the import file dialot, select "Names at Line = 1" and for the number of rows for the preview also 1 and click on "refresh" - the same error message is shown which is misleading in this case
LabPlot Version
Debug build 2.11.0-307-g9af14697a
Sep 15 2024, 18:37:29
System: openSUSE Leap 15.5
Locale: English,United Kingdom (Decimal point '.', Group separator ','
Number settings: Decimal point '.', Group separator ',', Exponential 'E', Zero digit '0', Percent '%', Positive/Negative sign '+'/'-' (Updated on restart)
Architecture: x86_64-little_endian-lp64
Kernel: linux 5.14.21-150500.55.73-default
C++ Compiler: GNU 13.3.0
C++ Compiler Flags: -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Werror=undef -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -pedantic -Wzero-as-null-pointer-constant -Wmissing-include-dirs -Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector -fexceptions -std=c++17 -O2 -
Edited by Stefan Gerlach