How can I catch WLSTException in a class I import from a custom module?
I have a small sample module test_cd.py. It imports wl.py created with writeIniFile('wl.py').
import sys, os
import wl
class myDomain:
myDom = None
def __init__(self, domPath):
try:
wl.readDomain(domPath)
print 'did not catch WLSTException'
self.myDom = wl.cmo
except wl.WLSTException:
print 'wl.WLSTException caught: '
return None
except:
print 'Unknown Exception caught: '
print sys.exc_info()[0]
wl.dumpStack()
return None
def getSSL(self):
try:
SSL = wl.cd('/Server/' + self.myDom.getAdminServerName() + '/SSL/NO_NAME_0')
print 'did not catch WLSTException'