#-----------------------------------------------------------------------------# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------''' Provide named exceptions having to do with handling Bokeh Protocolmessages.'''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=('MessageError','ProtocolError','ValidationError',)#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------
[docs]classMessageError(Exception):''' Indicate an error in constructing a Bokeh Message object. This exception usually indicates that the JSON fragments of a message cannot be decoded at all. '''pass
[docs]classProtocolError(Exception):''' Indicate an error in processing wire protocol fragments. This exception indicates that decoded message fragments cannot be properly assembled. '''pass
[docs]classValidationError(Exception):''' Indicate an error validating wire protocol fragments. This exception typically indicates that a binary message fragment was received when a text fragment was expected, or vice-versa. '''pass