mirror of https://github.com/sveltejs/svelte
fix: don't define `error.message` if it's not configurable (#16149)
* fix: don't define `error.message` if it's not configurable * fix: print console.error with updated stack * fix: revert second `console.error`pull/16157/head
parent
da63318191
commit
113a3daab2
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: don't define `error.message` if it's not configurable
|
@ -0,0 +1,8 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
compileOptions: {
|
||||||
|
dev: true
|
||||||
|
},
|
||||||
|
error: 'test'
|
||||||
|
});
|
@ -0,0 +1,11 @@
|
|||||||
|
<script>
|
||||||
|
class CustomError extends Error {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
Object.defineProperty(this, "message", {
|
||||||
|
value: "test"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new CustomError()
|
||||||
|
</script>
|
Loading…
Reference in new issue