Skip to content

Commit

Permalink
Improve error message for empty files
Browse files Browse the repository at this point in the history
Darxoon committed Jun 28, 2024
1 parent ae6b8b5 commit 7e5bbc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elf/parser.ts
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7e5bbc0

Please sign in to comment.