| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8a032fc commit 8849eb2
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -180,7 +180,8 @@ void PrintException(Isolate* isolate, | |||
| 180 | 180 | Local<Value> err, | |
| 181 | 181 | Local<Message> message) { | |
| 182 | 182 | node::Utf8Value reason(isolate, | |
| 183 | - err->ToDetailString(context).ToLocalChecked()); | ||
| 183 | + err->ToDetailString(context) | ||
| 184 | + .FromMaybe(Local<String>())); | ||
| 184 | 185 | bool added_exception_line = false; | |
| 185 | 186 | std::string source = | |
| 186 | 187 | GetErrorSource(isolate, context, message, &added_exception_line); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -125,8 +125,10 @@ static void PreviewEntries(const FunctionCallbackInfo<Value>& args) { | |||
| 125 | 125 | ||
| 126 | 126 | // Side effect-free stringification that will never throw exceptions. | |
| 127 | 127 | static void SafeToString(const FunctionCallbackInfo<Value>& args) { | |
| 128 | - auto context = args.GetIsolate()->GetCurrentContext(); | ||
| 129 | - args.GetReturnValue().Set(args[0]->ToDetailString(context).ToLocalChecked()); | ||
| 128 | + Local<Context> context = args.GetIsolate()->GetCurrentContext(); | ||
| 129 | + Local<String> detail_string; | ||
| 130 | + if (args[0]->ToDetailString(context).ToLocal(&detail_string)) | ||
| 131 | + args.GetReturnValue().Set(detail_string); | ||
| 130 | 132 | } | |
| 131 | 133 | ||
| 132 | 134 | inline Local<Private> IndexToPrivateSymbol(Environment* env, uint32_t index) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments