shell-mirror
Version:
Access your Mac shell from any device securely. Perfect for mobile coding with Claude Code CLI, Gemini CLI, and any shell tool.
21 lines (17 loc) • 584 B
JavaScript
;
function RTCError(code, message) {
this.name = this.reasonName[Math.min(code, this.reasonName.length - 1)];
this.message = typeof message === 'string' ? message : this.name;
}
RTCError.prototype.reasonName = [
// These strings must match those defined in the WebRTC spec.
'NO_ERROR', // Should never happen -- only used for testing
'INVALID_CONSTRAINTS_TYPE',
'INVALID_CANDIDATE_TYPE',
'INVALID_STATE',
'INVALID_SESSION_DESCRIPTION',
'INCOMPATIBLE_SESSION_DESCRIPTION',
'INCOMPATIBLE_CONSTRAINTS',
'INTERNAL_ERROR'
];
module.exports = RTCError;