Example usage for java.util ServiceConfigurationError printStackTrace

List of usage examples for java.util ServiceConfigurationError printStackTrace

Introduction

In this page you can find the example usage for java.util ServiceConfigurationError printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:dictionary.DictionaryService.java

public String getDefinition(String word) {
    String definition = null;/*from   w  w  w.  j  a v a2 s.c o  m*/

    try {
        Iterator<Dictionary> dictionaries = loader.iterator();
        while (definition == null && dictionaries.hasNext()) {
            Dictionary d = dictionaries.next();
            definition = d.getDefinition(word);
        }
    } catch (ServiceConfigurationError serviceError) {
        definition = null;
        serviceError.printStackTrace();

    }
    return definition;
}