| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index 89c752b2815a24a3d8195c704feac4f029d67bf3..39314b2819497132d5bbaf37489a7287091932b5 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -1060,7 +1060,11 @@ static void WriteSnapshotFile(const char* snapshot_directory,
|
| }
|
|
|
| File* file = File::Open(qualified_filename, File::kWriteTruncate);
|
| - ASSERT(file != NULL);
|
| + if (file == NULL) {
|
| + ErrorExit(kErrorExitCode,
|
| + "Unable to open file %s for writing snapshot\n",
|
| + qualified_filename);
|
| + }
|
|
|
| if (write_magic_number) {
|
| // Write the magic number to indicate file is a script snapshot.
|
| @@ -1069,7 +1073,7 @@ static void WriteSnapshotFile(const char* snapshot_directory,
|
|
|
| if (!file->WriteFully(buffer, size)) {
|
| ErrorExit(kErrorExitCode,
|
| - "Unable to open file %s for writing snapshot\n",
|
| + "Unable to write file %s for writing snapshot\n",
|
| qualified_filename);
|
| }
|
| file->Release();
|
|
|