Package muntjac :: Package data :: Module buffered :: Class SourceException
[hide private]
[frames] | no frames]

Class SourceException

source code

              object --+                
                       |                
exceptions.BaseException --+            
                           |            
        exceptions.Exception --+        
                               |        
        exceptions.StandardError --+    
                                   |    
             exceptions.RuntimeError --+
                                       |
                  object --+           |
                           |           |
         util.IEventListener --+       |
                               |       |
   terminal.paintable.IPaintable --+   |
                                   |   |
terminal.error_message.IErrorMessage --+
                                       |
                                      SourceException

An exception that signals that one or more exceptions occurred while a buffered object tried to access its data source or if there is a problem in processing a data source.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self, source, cause=None)
Creates a source exception from one or multiple causes.
source code
 
getCause(self)
Gets the cause of the exception.
source code
 
getCauses(self)
Gets all the causes for this exception.
source code
 
getSource(self)
Gets a source of the exception.
source code
 
getErrorLevel(self)
Gets the error level of this buffered source exception.
source code
 
paint(self, target)
Paints the IPaintable into a UIDL stream.
source code
 
addListener(self, listener, iface=None)
Error messages are unmodifiable and thus listeners are not needed.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Error messages are inmodifiable and thus listeners are not needed.
source code
 
removeCallback(self, callback, eventType=None) source code
 
requestRepaint(self)
Error messages are inmodifiable and thus listeners are not needed.
source code
 
requestRepaintRequests(self)
Request sending of repaint events on any further visible changes.
source code
 
getDebugId(self)
Get's currently set debug identifier
source code
 
setDebugId(self, idd)
Adds an unique id for component that get's transferred to terminal for testing purposes.
source code

Inherited from exceptions.RuntimeError: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from terminal.error_message.IErrorMessage: CRITICAL, ERROR, INFORMATION, SYSTEMERROR, WARNING

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, source, cause=None)
(Constructor)

source code 

Creates a source exception from one or multiple causes.

Parameters:
  • source - the source object implementing the IBuffered interface.
  • cause - the original causes for this exception.
Overrides: object.__init__

getCause(self)

source code 

Gets the cause of the exception.

Returns:
The cause for the exception.
Raises:
  • MoreThanOneCauseException - if there is more than one cause for the exception. This is possible if the commit operation triggers more than one error at the same time.

getCauses(self)

source code 

Gets all the causes for this exception.

Returns:
throwables that caused this exception

getSource(self)

source code 

Gets a source of the exception.

Returns:
the IBuffered object which generated this exception.

getErrorLevel(self)

source code 

Gets the error level of this buffered source exception. The level of the exception is maximum error level of all the contained causes.

The causes that do not specify error level default to ERROR level. Also source exception without any causes are of level ERROR.

Returns:
the level of error as an integer.
Overrides: terminal.error_message.IErrorMessage.getErrorLevel

See Also: com.vaadin.terminal.IErrorMessage#getErrorLevel()

paint(self, target)

source code 

Paints the IPaintable into a UIDL stream. This method creates the UIDL sequence describing it and outputs it to the given UIDL stream.

It is called when the contents of the component should be painted in response to the component first being shown or having been altered so that its visual representation is changed.

Parameters:
  • target - the target UIDL stream where the component should paint itself to.
Raises:
Overrides: terminal.paintable.IPaintable.paint
(inherited documentation)

addListener(self, listener, iface=None)

source code 

Error messages are unmodifiable and thus listeners are not needed. This method should be implemented as empty.

Parameters:
  • listener - the listener to be added.
Overrides: terminal.paintable.IPaintable.addListener
(inherited documentation)

addCallback(self, callback, eventType=None, *args)

source code 
Overrides: terminal.paintable.IPaintable.addCallback

removeListener(self, listener, iface=None)

source code 

Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.

Parameters:
  • listener - the listener to be removed.
Overrides: terminal.paintable.IPaintable.removeListener
(inherited documentation)

removeCallback(self, callback, eventType=None)

source code 
Overrides: terminal.paintable.IPaintable.removeCallback

requestRepaint(self)

source code 

Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.

Overrides: terminal.paintable.IPaintable.requestRepaint
(inherited documentation)

requestRepaintRequests(self)

source code 

Request sending of repaint events on any further visible changes. Normally the paintable only send up to one repaint request for listeners after paint as the paintable as the paintable assumes that the listeners already know about the repaint need. This method resets the assumtion. Paint implicitly does the assumtion reset functionality implemented by this method.

This method is normally used only by the terminals to note paintables about implicit repaints (painting the component without actually invoking paint method).

Overrides: terminal.paintable.IPaintable.requestRepaintRequests
(inherited documentation)

getDebugId(self)

source code 

Get's currently set debug identifier

Returns:
current debug id, null if not set
Overrides: terminal.paintable.IPaintable.getDebugId
(inherited documentation)

setDebugId(self, idd)

source code 

Adds an unique id for component that get's transferred to terminal for testing purposes. Keeping identifiers unique throughout the Application instance is on programmers responsibility.

Note, that with the current terminal implementation the identifier cannot be changed while the component is visible. This means that the identifier should be set before the component is painted for the first time and kept the same while visible in the client.

Parameters:
  • idd - A short (< 20 chars) alphanumeric id
Overrides: terminal.paintable.IPaintable.setDebugId
(inherited documentation)