Skip to content

Commit 1e7947b

Browse files
committed
Guide users to reporting crashes
If quick-lint-js crashes with an assertion failure, point them to our bug tracker.
1 parent ed5c7f7 commit 1e7947b

File tree

3 files changed

+65
-2
lines changed

3 files changed

+65
-2
lines changed

src/assert.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ namespace quick_lint_js {
88
void report_assertion_failure(const char *qljs_file_name, int qljs_line,
99
const char *qljs_function_name,
1010
const char *message) {
11-
std::fprintf(stderr, "%s:%d: internal check failed in %s: %s\n",
11+
std::fprintf(stderr,
12+
"%s:%d: internal check failed in %s: %s\n"
13+
"quick-lint-js crashed. Please report this bug here:\n"
14+
"https://quick-lint-js.com/crash-report/\n",
1215
qljs_file_name, qljs_line, qljs_function_name, message);
1316
}
1417
}

website/public/common-nav.ejs.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@
119119
uri: "https://github.com/quick-lint/quick-lint-js",
120120
title: "Code on GitHub",
121121
},
122-
{ uri: "/contact/", title: "Contact" },
122+
{
123+
uri: "/contact/",
124+
title: "Contact",
125+
subpages: [
126+
{ uri: "/crash-report/", title: "Crash report", hidden: true },
127+
],
128+
},
123129
];
124130

125131
function pageLinkHTML(page) {
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!DOCTYPE html>
2+
<!-- Copyright (C) 2020 Matthew "strager" Glazar -->
3+
<!-- See end of file for extended copyright information. -->
4+
<html>
5+
<head>
6+
<%- await include("../common-head.ejs.html") %>
7+
<title>quick-lint-js: report a crash</title>
8+
<meta name="description" content="Report a quick-lint-js crash." />
9+
<link href="../main.css" rel="stylesheet" />
10+
</head>
11+
<body class="side-bar-nav">
12+
<header>
13+
<h1><a href="..">quick-lint-js</a></h1>
14+
<p class="tag-line">quick-lint-js finds bugs in JavaScript programs.</p>
15+
<%- await include("../common-nav.ejs.html") %>
16+
</header>
17+
18+
<main>
19+
<h2>Report a quick-lint-js crash</h2>
20+
<p>
21+
Found a crash in quick-lint-js? Report it in our
22+
<a href="https://github.com/quick-lint/quick-lint-js/issues/new"
23+
>bug tracker</a
24+
>.
25+
</p>
26+
<p>
27+
If you prefer to report a bug privately, email:
28+
29+
</p>
30+
</main>
31+
32+
<footer><%- await include("../common-footer-nav.ejs.html") %></footer>
33+
</body>
34+
</html>
35+
36+
<!--
37+
quick-lint-js finds bugs in JavaScript programs.
38+
Copyright (C) 2020 Matthew "strager" Glazar
39+
40+
This file is part of quick-lint-js.
41+
42+
quick-lint-js is free software: you can redistribute it and/or modify
43+
it under the terms of the GNU General Public License as published by
44+
the Free Software Foundation, either version 3 of the License, or
45+
(at your option) any later version.
46+
47+
quick-lint-js is distributed in the hope that it will be useful,
48+
but WITHOUT ANY WARRANTY; without even the implied warranty of
49+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50+
GNU General Public License for more details.
51+
52+
You should have received a copy of the GNU General Public License
53+
along with quick-lint-js. If not, see <https://www.gnu.org/licenses/>.
54+
-->

0 commit comments

Comments
 (0)