Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: gin/try_catch.cc

Issue 74753002: Introduce gin_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« gin/gin.gyp ('K') | « gin/try_catch.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "gin/try_catch.h"
6
7 #include "gin/converter.h"
8
9 namespace gin {
10
11 TryCatch::TryCatch() {
12 }
13
14 TryCatch::~TryCatch() {
15 }
16
17 bool TryCatch::HasCaught() {
18 return try_catch_.HasCaught();
19 }
20
21 std::string TryCatch::GetPrettyMessage() {
22 std::string info;
23 ConvertFromV8(try_catch_.Message()->Get(), &info);
24
25 std::string sounce_line;
26 if (ConvertFromV8(try_catch_.Message()->GetSourceLine(), &sounce_line))
27 info += "\n" + sounce_line;
28
29 return info;
30 }
31
32 } // namespace gin
OLDNEW
« gin/gin.gyp ('K') | « gin/try_catch.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698