blob: 3b010db4f22177b14935100521d8d08eec9f0ca0 [file] [log] [blame]
/**
* @class ConstructorErrorProcessor
* @extends AudioWorkletProcessor
*/
class ConstructorErrorProcessor extends AudioWorkletProcessor {
constructor() {
throw 'ConstructorErrorProcessor: an error thrown from constructor.';
}
process() {
return true;
}
}
/**
* @class ProcessErrorProcessor
* @extends AudioWorkletProcessor
*/
class ProcessErrorProcessor extends AudioWorkletProcessor {
constructor() {
super();
}
process() {
throw 'ProcessErrorProcessor: an error throw from process method.';
return true;
}
}
registerProcessor('constructor-error', ConstructorErrorProcessor);
registerProcessor('process-error', ProcessErrorProcessor);