mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-07 19:25:13 +02:00
13 lines
207 B
JavaScript
13 lines
207 B
JavaScript
/**
|
|
* Throw a given error.
|
|
*
|
|
* @param {Error|null|undefined} [error]
|
|
* Maybe error.
|
|
* @returns {asserts error is null|undefined}
|
|
*/
|
|
export function bail(error) {
|
|
if (error) {
|
|
throw error
|
|
}
|
|
}
|