| <!-- | |
| Copyright 2024 The Chromium Authors | |
| Use of this source code is governed by a BSD-style license that can be | |
| found in the LICENSE file. | |
| --> | |
| <!DOCTYPE html> | |
| <script> | |
| function foo() { | |
| throw new Error('original'); | |
| } | |
| function bar() { | |
| foo(); | |
| } | |
| function caller() { | |
| try { | |
| bar(); | |
| } catch (e) { | |
| throw new Error('rethrower', {cause: e}); | |
| } | |
| } | |
| caller(); | |
| </script> |