mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:57:45 +00:00
LibCore: Use ErrorOr<T> for Core::File::open()
This commit is contained in:
parent
fac2550143
commit
a7f1f1c34b
24 changed files with 42 additions and 48 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/Wizards/WizardDialog.h>
|
||||
#include <LibGUI/Wizards/WizardPage.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// This is defined in ImportDialog.cpp, we can't include it twice, since the generated symbol is exported.
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "../XSV.h"
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <string.h>
|
||||
|
||||
TEST_CASE(should_parse_valid_data)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ Result<bool, String> Workbook::load(const StringView& filename)
|
|||
sb.append("Failed to open ");
|
||||
sb.append(filename);
|
||||
sb.append(" for reading. Error: ");
|
||||
sb.append(file_or_error.error().string());
|
||||
sb.appendff("{}", file_or_error.error());
|
||||
|
||||
return sb.to_string();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue