Home | Trees | Indices | Help |
|
---|
|
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 161841 4220 """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 384452 53 56 57 60 61 64 65 6846 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)
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Apr 20 16:53:10 2013 | http://epydoc.sourceforge.net |