예제 #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")
예제 #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')
예제 #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")
예제 #4
0
파일: test_suite.py 프로젝트: Jens-G/thrift
 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')
예제 #5
0
파일: TestServer.py 프로젝트: reTXT/thrift
 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')
예제 #6
0
파일: TestServer.py 프로젝트: reTXT/thrift
 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)
예제 #7
0
파일: test_suite.py 프로젝트: ste93/yarp
 def testException(self, s):
     if s == 'Xception':
         raise Xception(1001, s)
     elif s == 'throw_undeclared':
         raise ValueError('testing undeclared exception')
예제 #8
0
파일: test_suite.py 프로젝트: ste93/yarp
 def testException(self, s):
     if s == 'Xception':
         raise Xception(1001, s)
     elif s == "throw_undeclared":
         raise ValueError("foo")