Example usage for org.springframework.oxm UnmarshallingFailureException contains

List of usage examples for org.springframework.oxm UnmarshallingFailureException contains

Introduction

In this page you can find the example usage for org.springframework.oxm UnmarshallingFailureException contains.

Prototype

public boolean contains(@Nullable Class<?> exType) 

Source Link

Document

Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type.

Usage

From source file:com.cisco.cta.taxii.adapter.persistence.SimpleFileHandler.java

@Override
public TaxiiStatus load() {
    try {//from   w  w w .  j a v a 2 s. c o m
        Source source = new StreamSource(file);
        return (TaxiiStatus) marshaller.unmarshal(source);
    } catch (UnmarshallingFailureException e) {
        if (e.contains(FileNotFoundException.class)) {
            log.info("File {} doesn't exist yet", file);
            return new TaxiiStatus();
        } else {
            throw e;
        }
    }
}