diff --git a/javav2/example_code/transcribe/src/main/java/com/amazonaws/transcribestreaming/TranscribeMedicalStreamingDemoApp.java b/javav2/example_code/transcribe/src/main/java/com/amazonaws/transcribestreaming/TranscribeMedicalStreamingDemoApp.java index de433188744..f46009a3b1d 100644 --- a/javav2/example_code/transcribe/src/main/java/com/amazonaws/transcribestreaming/TranscribeMedicalStreamingDemoApp.java +++ b/javav2/example_code/transcribe/src/main/java/com/amazonaws/transcribestreaming/TranscribeMedicalStreamingDemoApp.java @@ -63,7 +63,7 @@ private static InputStream getStreamFromMic() throws LineUnavailableException { if (!AudioSystem.isLineSupported(info)) { System.out.println("Line not supported"); - System.exit(0); + throw new LineUnavailableException("The audio system microphone line is not supported."); } TargetDataLine line = (TargetDataLine) AudioSystem.getLine(info);