Skip to content
Snippets Groups Projects
Commit 884d246a authored by Arkerthan's avatar Arkerthan
Browse files

strip out file path from error messages

parent bb5167a6
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ Find result files in the dist directory. ...@@ -40,7 +40,7 @@ Find result files in the dist directory.
Patching Patching
create a new patch with create a new patch with
git apply <full path to sugarcube-fc-changes.patch> git diff HEAD > <full path to sugarcube-fc-changes.patch>
Make sure to stage new files first as otherwise they are lost. Make sure to stage new files first as otherwise they are lost.
APPENDIX Lists required steps very briefly. APPENDIX Lists required steps very briefly.
......
...@@ -11,7 +11,7 @@ index 7a17935..565faa3 100644 ...@@ -11,7 +11,7 @@ index 7a17935..565faa3 100644
'src/lib/simplestore/adapters/cookie.js', 'src/lib/simplestore/adapters/cookie.js',
'src/lib/debugview.js', 'src/lib/debugview.js',
diff --git a/src/lib/helpers.js b/src/lib/helpers.js diff --git a/src/lib/helpers.js b/src/lib/helpers.js
index 2c0157e..f29d190 100644 index 2c0157e..0448427 100644
--- a/src/lib/helpers.js --- a/src/lib/helpers.js
+++ b/src/lib/helpers.js +++ b/src/lib/helpers.js
@@ -248,7 +248,7 @@ var { // eslint-disable-line no-var @@ -248,7 +248,7 @@ var { // eslint-disable-line no-var
...@@ -31,7 +31,7 @@ index 2c0157e..f29d190 100644 ...@@ -31,7 +31,7 @@ index 2c0157e..f29d190 100644
+ const lines = stack.split('\n'); + const lines = stack.split('\n');
+ for (const ll of lines) { + for (const ll of lines) {
+ const div = document.createElement('div'); + const div = document.createElement('div');
+ div.append(ll); + div.append(ll.replace(/file:.*\//, '<path>/'));
+ $source.append(div); + $source.append(div);
+ } + }
+ } + }
...@@ -283,7 +283,7 @@ index d179d9c..265ce5d 100644 ...@@ -283,7 +283,7 @@ index d179d9c..265ce5d 100644
} }
diff --git a/src/macros/macrolib.js b/src/macros/macrolib.js diff --git a/src/macros/macrolib.js b/src/macros/macrolib.js
index e9500f4..b1d3980 100644 index e9500f4..6108297 100644
--- a/src/macros/macrolib.js --- a/src/macros/macrolib.js
+++ b/src/macros/macrolib.js +++ b/src/macros/macrolib.js
@@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
...@@ -304,6 +304,15 @@ index e9500f4..b1d3980 100644 ...@@ -304,6 +304,15 @@ index e9500f4..b1d3980 100644
} }
} }
}); });
@@ -493,7 +493,7 @@
}
}
catch (ex) {
- return this.error(`bad conditional expression in <<${i === 0 ? 'if' : 'elseif'}>> clause${i > 0 ? ' (#' + i + ')' : ''}: ${typeof ex === 'object' ? ex.message : ex}`); // eslint-disable-line prefer-template
+ return this.error(`bad conditional expression in <<${i === 0 ? 'if' : 'elseif'}>> clause${i > 0 ? ' (#' + i + ')' : ''}: ${typeof ex === 'object' ? `${ex.name}: ${ex.message}` : ex}`, null, ex.stack); // eslint-disable-line prefer-template
}
}
});
diff --git a/src/markup/wikifier.js b/src/markup/wikifier.js diff --git a/src/markup/wikifier.js b/src/markup/wikifier.js
index e206f96..61381f0 100644 index e206f96..61381f0 100644
--- a/src/markup/wikifier.js --- a/src/markup/wikifier.js
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment