Skip to content

Commit eaeecfc

Browse files
Aaron1011Herschel
authored andcommitted
Adjust error message
1 parent 613a255 commit eaeecfc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

core/src/loader.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,17 +773,19 @@ impl<'gc> Loader<'gc> {
773773
);
774774
}
775775
}
776-
Err(err) => {
776+
Err(_err) => {
777777
// Testing with Flash shoes that the 'data' property is cleared
778778
// when an error occurs
779779

780780
set_data(Vec::new(), &mut activation, target, data_format);
781+
782+
// FIXME - Match the exact error message generated by Flash
781783
let mut io_error_evt = Avm2Event::new(
782784
"ioError",
783785
Avm2EventData::IOError {
784786
text: AvmString::new_utf8(
785787
activation.context.gc_context,
786-
format!("Ruffle: Failed to fetch url '{:?}' : {:?}", url, err),
788+
"Error #2032: Stream Error",
787789
),
788790
},
789791
);

tests/tests/swfs/avm2/url_loader/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ Loaded binary with length: 4
1515
2
1616
3
1717
IOErrorEvent.IO_ERROR: [object URLLoader]
18-
IOErrorEvent text: Ruffle: Failed to fetch url '"missingFile.bin"' : FetchError("No such file or directory (os error 2)")
18+
IOErrorEvent text: Error #2032: Stream Error
1919
Old data:

0 commit comments

Comments
 (0)