Message from discussion
Send non-JS output (e.g. errors) to stderr, instead of stdout. (issue 11365202)
Received: by 10.100.237.4 with SMTP id k4mr2233778anh.25.1352796499044;
Tue, 13 Nov 2012 00:48:19 -0800 (PST)
X-BeenThere: v8-dev@googlegroups.com
Received: by 10.236.142.195 with SMTP id i43ls10461824yhj.4.gmail; Tue, 13 Nov
2012 00:48:18 -0800 (PST)
Received: by 10.236.44.168 with SMTP id n28mr14024278yhb.21.1352796498293;
Tue, 13 Nov 2012 00:48:18 -0800 (PST)
Received: by 10.236.44.168 with SMTP id n28mr14024277yhb.21.1352796498285;
Tue, 13 Nov 2012 00:48:18 -0800 (PST)
Return-Path: <3UQmiUBUJAHYWbligcogWiXYlYpcYq-blagUcf....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com>
Received: from mail-gh0-f200.google.com (mail-gh0-f200.google.com [209.85.160.200])
by gmr-mx.google.com with ESMTPS id h50si735614yhi.3.2012.11.13.00.48.17
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 13 Nov 2012 00:48:17 -0800 (PST)
Received-SPF: pass (google.com: domain of 3UQmiUBUJAHYWbligcogWiXYlYpcYq-blagUcf....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.160.200 as permitted sender) client-ip=209.85.160.200;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 3UQmiUBUJAHYWbligcogWiXYlYpcYq-blagUcf....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.160.200 as permitted sender) smtp.mail=3UQmiUBUJAHYWbligcogWiXYlYpcYq-blagUcf....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com; dkim=pass header...@chromium.org
Received: by mail-gh0-f200.google.com with SMTP id 10so1045212ghy.3
for <v8-dev@googlegroups.com>; Tue, 13 Nov 2012 00:48:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google;
h=mime-version:reply-to:x-google-appengine-app-id:message-id:date
:subject:from:to:cc:content-type;
bh=oAfy2hcO8Cls3p8vWvvkTXPyKVIKjBej2g+Z09HBaLQ=;
b=j3aaweVTzXuz8qx4wGF9qf81u3ZHs9uzt1wZmnSKn9rdnx87E6CyzHyP2/vwPA6KBQ
QCFERNXKncsMnVRXD6M3k1rvh7alKyg5hNIJ2S53nWszqVci5Dt12ATi50S131n74eZ6
ECh9RRphrbWxyNLuPFRnda1PYRjFmernKK8uM=
MIME-Version: 1.0
Received: by 10.58.189.35 with SMTP id gf3mr6698729vec.11.1352796497025; Tue,
13 Nov 2012 00:48:17 -0800 (PST)
Reply-To: dub...@chromium.org, yang...@chromium.org, svenpa...@chromium.org,
v8-dev@googlegroups.com
Message-ID: <047d7b624c6ca89a4704ce5c7...@google.com>
Date: Tue, 13 Nov 2012 08:48:17 +0000
Subject: Re: Send non-JS output (e.g. errors) to stderr, instead of stdout.
(issue 11365202)
From: yang...@chromium.org
To: dub...@chromium.org, svenpa...@chromium.org
Cc: v8-dev@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Some comments.
https://codereview.chromium.org/11365202/diff/1/samples/shell.cc
File samples/shell.cc (right):
https://codereview.chromium.org/11365202/diff/1/samples/shell.cc#newcode253
samples/shell.cc:253: fprintf(stderr, "V8 version %s [sample shell]\n",
v8::V8::GetVersion());
This is the prompt of the interactive shell and must not go to stderr.
https://codereview.chromium.org/11365202/diff/1/samples/shell.cc#newcode260
samples/shell.cc:260: fprintf(stderr, "> ");
Ditto.
https://codereview.chromium.org/11365202/diff/1/samples/shell.cc#newcode266
samples/shell.cc:266: fprintf(stderr, "\n");
Ditto.
https://codereview.chromium.org/11365202/diff/1/samples/shell.cc#newcode314
samples/shell.cc:314: fprintf(stderr, "%s\n", exception_string);
This reports uncaught exceptions caused in javascript. I think the
policy should be that error messages caused in this shell (like failed
read of a file) should go to stderr and error messages of the javascript
runtime should go to stdout. Same goes for all the output in this
function.
https://codereview.chromium.org/11365202/