Package muntjac :: Package terminal :: Package gwt :: Package server :: Module exceptions
[hide private]
[frames] | no frames]

Source Code for Module muntjac.terminal.gwt.server.exceptions

 1  # Copyright (C) 2012 Vaadin Ltd.  
 2  # Copyright (C) 2012 Richard Lincoln 
 3  #  
 4  # Licensed under the Apache License, Version 2.0 (the "License");  
 5  # you may not use this file except in compliance with the License.  
 6  # You may obtain a copy of the License at  
 7  #  
 8  #     http://www.apache.org/licenses/LICENSE-2.0  
 9  #  
10  # Unless required by applicable law or agreed to in writing, software  
11  # distributed under the License is distributed on an "AS IS" BASIS,  
12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
13  # See the License for the specific language governing permissions and  
14  # limitations under the License. 
15   
16   
17 -class SystemMessageException(RuntimeError):
18
19 - def __init__(self, *args):
20 """Constructs a new C{SystemMessageException} with 21 the specified detail message and/or cause. 22 """ 23 nargs = len(args) 24 if nargs == 1: 25 if isinstance(args[0], Exception): 26 super(SystemMessageException, self).__init__() 27 self._cause = args[0] 28 else: 29 msg = args[0] 30 super(SystemMessageException, self).__init__(msg) 31 elif nargs == 2: 32 msg, cause = args 33 super(SystemMessageException, self).__init__(msg) 34 self._cause = cause 35 else: 36 raise ValueError, 'too many arguments'
37 38
39 - def getCause(self):
40 return self._cause
41 42
43 -class UploadException(Exception):
44
45 - def __init__(self, arg):
46 if isinstance(arg, Exception): 47 e = arg 48 super(UploadException, self).__init__('Upload failed', e) 49 else: 50 msg = arg 51 super(UploadException, self).__init__(msg)
52 53
54 -class NoInputStreamException(Exception):
55 pass
56 57
58 -class NoOutputStreamException(Exception):
59 pass
60 61
62 -class ServletException(Exception):
63 pass
64 65
66 -class SessionExpiredException(Exception):
67 pass
68