Debian Codegraph @

src/main/java/org/broadinstitute/hellbender/utils/bwa/CouldNotReadImageException.java

raw
1 package org.broadinstitute.hellbender.utils.bwa;
2
3 /**
4 * Created by valentin on 7/30/17.
5 */
6 public class CouldNotReadImageException extends RuntimeException {
7
8 private final String image;
9
10 public CouldNotReadImageException(final String image, final String message) {
11 super(composeMessage(image, message));
12 this.image = image;
13 }
14
15 public String getImage() {
16 return image;
17 }
18
19 public CouldNotReadImageException(final String image) {
20 super(composeMessage(image, null));
21 this.image = image;
22 }
23
24 private static String composeMessage(final String image, final String message) {
25 return String.format("cannot read the image file '%s'" + (message == null ? "" : ": " + message), image);
26 }
27 }