Exemplo n.º 1
0
 def testException(self, s):
     if s == 'Xception':
         x = Xception()
         x.errorCode = 1001
         x.message = s
         raise x
     elif s == "throw_undeclared":
         raise ValueError("foo")
Exemplo n.º 2
0
 def testException(self, s):
     if s == 'Xception':
         x = Xception()
         x.errorCode = 1001
         x.message = s
         raise x
     elif s == 'throw_undeclared':
         raise ValueError('testing undeclared exception')
Exemplo n.º 3
0
 def testException(self, s):
     if s == "Xception":
         x = Xception()
         x.errorCode = 1001
         x.message = s
         raise x
     elif s == "throw_undeclared":
         raise ValueError("foo")
Exemplo n.º 4
0
 def testException(self, s):
     if s == 'Xception':
         x = Xception()
         x.errorCode = 1001
         x.message = s
         raise x
     elif s == 'throw_undeclared':
         raise ValueError('testing undeclared exception')
Exemplo n.º 5
0
 def testException(self, arg):
     # if options.verbose > 1:
     logging.info('testException(%s)' % arg)
     if arg == 'Xception':
         raise Xception(errorCode=1001, message=arg)
     elif arg == 'TException':
         raise TException(message='This is a TException')
Exemplo n.º 6
0
 def testMultiException(self, arg0, arg1):
     if options.verbose > 1:
         logging.info('testMultiException(%s, %s)' % (arg0, arg1))
     if arg0 == 'Xception':
         raise Xception(errorCode=1001, message='This is an Xception')
     elif arg0 == 'Xception2':
         raise Xception2(
             errorCode=2002,
             struct_thing=Xtruct(string_thing='This is an Xception2'))
     return Xtruct(string_thing=arg1)
Exemplo n.º 7
0
 def testException(self, s):
     if s == 'Xception':
         raise Xception(1001, s)
     elif s == 'throw_undeclared':
         raise ValueError('testing undeclared exception')
Exemplo n.º 8
0
 def testException(self, s):
     if s == 'Xception':
         raise Xception(1001, s)
     elif s == "throw_undeclared":
         raise ValueError("foo")