implemented frontend including separate message system; started to implement backend
This commit is contained in:
36
yjs-poll/node_modules/lib0/error.js
generated
vendored
Normal file
36
yjs-poll/node_modules/lib0/error.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Error helpers.
|
||||
*
|
||||
* @module error
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @return {Error}
|
||||
*/
|
||||
/* c8 ignore next */
|
||||
export const create = s => new Error(s)
|
||||
|
||||
/**
|
||||
* @throws {Error}
|
||||
* @return {never}
|
||||
*/
|
||||
/* c8 ignore next 3 */
|
||||
export const methodUnimplemented = () => {
|
||||
throw create('Method unimplemented')
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws {Error}
|
||||
* @return {never}
|
||||
*/
|
||||
/* c8 ignore next 3 */
|
||||
export const unexpectedCase = () => {
|
||||
throw create('Unexpected case')
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} property
|
||||
* @return {asserts property is true}
|
||||
*/
|
||||
export const assert = property => { if (!property) throw create('Assert failed') }
|
||||
Reference in New Issue
Block a user