Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- Create Jython Code
- Use External Java JAR Files within Jython
- Execution of the Code
- Modifying Out-of-the-Box Scripts
- Structure of the Jython File
- Results Generation by the Jython Script
- The Framework Instance
- Finding the Correct Credentials (for Connection Adapters)
- Handling Exceptions from Java
- Troubleshooting Migration from Jython Version 2.1 to 2.5.3
Handling Exceptions from Java
Some Java classes throw an exception upon failure. It is recommended to catch the exception and handle it, otherwise it causes the adapter to terminate unexpectedly.
When catching a known exception, in most cases you should print its stack trace to the log and issue a proper message to the UI.
Note It is very important to import the Java base exception class as shown in the following example due to the presence of the base exception class in Python with the same name.
from java.lang import Exception as JException try: client = Framework.createClient(Framework.getTriggerCIData(BaseClient.CREDENTIALS_ID)) except JException, ex: # process java exceptions only Framework.reportError('Connection failed') logger.debugException(str(ex)) return
If the exception is not fatal and the script can continue, you should omit the call for the reportError()
method and enable the script to continue.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to cms-doc@microfocus.com.
Help Topic ID:
Product:
Topic Title:
Feedback: