Oracle Weblogic Server (MOSC)

MOSC Banner

How can I catch WLSTException in a class I import from a custom module?

edited Mar 9, 2017 4:00AM in Oracle Weblogic Server (MOSC) 2 commentsAnswered
I am using WebLogic 10.3.2 (WLT is Jython 2.2.1) on Windows Server 2003

 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'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center