Index: src/messages.cc |
diff --git a/src/messages.cc b/src/messages.cc |
index c21f96c0187a91370c44f0b948a27fbaf68b6da9..8daeacaa6b4a143aa0011c47d231c1aa237dca67 100644 |
--- a/src/messages.cc |
+++ b/src/messages.cc |
@@ -312,6 +312,7 @@ MaybeHandle<String> MessageTemplate::FormatMessage(int template_index, |
Handle<String> arg0, |
Handle<String> arg1, |
Handle<String> arg2) { |
+ Isolate* isolate = arg0->GetIsolate(); |
const char* template_string; |
switch (template_index) { |
#define CASE(NAME, STRING) \ |
@@ -322,12 +323,10 @@ MaybeHandle<String> MessageTemplate::FormatMessage(int template_index, |
#undef CASE |
case kLastMessage: |
default: |
- UNREACHABLE(); |
- template_string = ""; |
- break; |
+ isolate->ThrowIllegalOperation(); |
+ return MaybeHandle<String>(); |
} |
- Isolate* isolate = arg0->GetIsolate(); |
IncrementalStringBuilder builder(isolate); |
unsigned int i = 0; |