This docs on this page refers to a PREVIOUS VERSION. For the latest stable release, go to https://docs.bokeh.org/

Archived docs for versions <= 1.0.4 have had to be modified from their original published configuration, and may be missing some features (e.g. source listing)

All users are encourage to update to version 1.1 or later, as soon as they are able.

bokeh.protocol.exceptions — Bokeh 1.0.3 documentation

Source code for bokeh.protocol.exceptions

#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-----------------------------------------------------------------------------
''' Provide named exceptions having to do with handling Bokeh Protocol
messages.

'''

#-----------------------------------------------------------------------------
# Boilerplate
#-----------------------------------------------------------------------------
from __future__ import absolute_import, division, print_function, unicode_literals

import logging
log = logging.getLogger(__name__)

#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------

# Standard library imports

# External imports

# Bokeh imports

#-----------------------------------------------------------------------------
# Globals and constants
#-----------------------------------------------------------------------------

__all__ = (
    'MessageError',
    'ProtocolError',
    'ValidationError',
)

#-----------------------------------------------------------------------------
# General API
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Dev API
#-----------------------------------------------------------------------------

[docs]class MessageError(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]class ProtocolError(Exception): ''' Indicate an error in processing wire protocol fragments. This exception indicates that decoded message fragments cannot be properly assembled. ''' pass
[docs]class ValidationError(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
#----------------------------------------------------------------------------- # Private API #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # Code #-----------------------------------------------------------------------------