Closed Bug 329908 Opened 20 years ago Closed 17 years ago

readFile should throw an error if the file being requested does not exist

Categories

(Rhino Graveyard :: Core, defect, P5)

PowerPC
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cedwards, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8 Build Identifier: Calling readFile with a non-existent file currently returns an empty string; it should thow an IOException if the file does not exist. Reproducible: Always Steps to Reproduce: 1. run "print(readFile("doesnotexist")) 2. 3. Actual Results: an empty string is returned Expected Results: IOException if the file is not found
Reassigning to the reporter as I have neither interest nor time for Rhino. See also bug 288433.
Assignee: igor.bukanov → cedwards
Priority: -- → P5
Attached patch trivial patchSplinter Review
Anything else needed?
Attachment #293996 - Flags: review?
Perfect. Thanks!
Assignee: cedwards → nobody
Committed a slightly modified patch. Checking in toolsrc/org/mozilla/javascript/tools/shell/Global.java; /cvsroot/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Global.java,v <-- Global.java new revision: 1.55; previous revision: 1.54 done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attachment #293996 - Flags: review?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: