From 7e5bbc0e64afe1c7da113f5cede1f6fef28d2bf0 Mon Sep 17 00:00:00 2001 From: Darxoon Date: Fri, 28 Jun 2024 22:57:53 +0200 Subject: [PATCH] Improve error message for empty files --- src/elf/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elf/parser.ts b/src/elf/parser.ts index 3a3f7e3..9f85356 100644 --- a/src/elf/parser.ts +++ b/src/elf/parser.ts @@ -110,7 +110,7 @@ export default function parseElfBinary(dataType: DataType, arrayBuffer: ArrayBuf if (sections.filter(section => section.name == '.data').length === 0) { - throw new EmptyFileError("No .data section existant") + throw new EmptyFileError("The file is empty. Open a different one instead and clear out its contents") } // for most of the file formats, the data is stored in the .data section