// Path: src/main/java/com/github/xsavikx/androidscreencast/exception/AndroidScreenCastRuntimeException.java
// public class AndroidScreenCastRuntimeException extends RuntimeException {
// 
//     private String additionalInformation;
// 
//     public AndroidScreenCastRuntimeException() {
//     }
// 
//     public AndroidScreenCastRuntimeException(String message) {
//         super(message);
//     }
// 
// 
//     public AndroidScreenCastRuntimeException(String message, String additionalInformation) {
//         super(message);
//         this.additionalInformation = additionalInformation;
//     }
// 
//     public AndroidScreenCastRuntimeException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public AndroidScreenCastRuntimeException(Throwable cause) {
//         super(cause);
//     }
// 
//     public AndroidScreenCastRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// 
//     public String getAdditionalInformation() {
//         return additionalInformation;
//     }
// }
// 
// Path: src/main/java/com/github/xsavikx/androidscreencast/exception/IORuntimeException.java
// public final class IORuntimeException extends AndroidScreenCastRuntimeException {
// 
//     public IORuntimeException(String message, IOException cause) {
//         super(message, cause);
//     }
// 
//     public IORuntimeException(IOException cause) {
//         super(cause);
//     }
// 
//     public IORuntimeException(String message, IOException cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }
// 
// Path: src/main/java/com/github/xsavikx/androidscreencast/util/StringUtils.java
// public final class StringUtils {
// 
//     private StringUtils() {
//     }
// 
//     public static boolean isNotEmpty(final CharSequence charSequence) {
//         return charSequence != null && charSequence.length() > 0;
//     }
// }


import com.github.xsavikx.androidscreencast.exception.AndroidScreenCastRuntimeException;
import com.github.xsavikx.androidscreencast.exception.IORuntimeException;
import com.github.xsavikx.androidscreencast.util.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
        errorDialogLabel = new JLabel();
        JScrollPane scrollPane = new JScrollPane();
        errorDescription = new JTextArea();
        errorDescription.setLineWrap(true);
        errorDescription.setWrapStyleWord(true);


        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout(5, 5));


        errorDialogLabel.setText(ex.getClass().getSimpleName());
        errorDialogLabel.setLabelFor(errorDescription);
        errorDialogLabel.setHorizontalAlignment(SwingConstants.CENTER);
        contentPane.add(errorDialogLabel, BorderLayout.NORTH);
        setErrorDetails(ex);

        scrollPane.setViewportView(errorDescription);
        contentPane.add(scrollPane, BorderLayout.CENTER);
        pack();
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setSize((int) screenSize.getWidth() >> 1, (int) screenSize.getHeight() >> 1);
        setLocationRelativeTo(null);
        setAlwaysOnTop(true);
    }

    private void setErrorDetails(Throwable e) {
        Throwable ex = getRealException(e);
        errorDialogLabel.setText(ex.getClass().getSimpleName());
        try (StringWriter stringWriter = new StringWriter()) {
// Path: src/main/java/com/github/xsavikx/androidscreencast/exception/AndroidScreenCastRuntimeException.java
// public class AndroidScreenCastRuntimeException extends RuntimeException {
// 
//     private String additionalInformation;
// 
//     public AndroidScreenCastRuntimeException() {
//     }
// 
//     public AndroidScreenCastRuntimeException(String message) {
//         super(message);
//     }
// 
// 
//     public AndroidScreenCastRuntimeException(String message, String additionalInformation) {
//         super(message);
//         this.additionalInformation = additionalInformation;
//     }
// 
//     public AndroidScreenCastRuntimeException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public AndroidScreenCastRuntimeException(Throwable cause) {
//         super(cause);
//     }
// 
//     public AndroidScreenCastRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// 
//     public String getAdditionalInformation() {
//         return additionalInformation;
//     }
// }
// 
// Path: src/main/java/com/github/xsavikx/androidscreencast/exception/IORuntimeException.java
// public final class IORuntimeException extends AndroidScreenCastRuntimeException {
// 
//     public IORuntimeException(String message, IOException cause) {
//         super(message, cause);
//     }
// 
//     public IORuntimeException(IOException cause) {
//         super(cause);
//     }
// 
//     public IORuntimeException(String message, IOException cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }
// 
// Path: src/main/java/com/github/xsavikx/androidscreencast/util/StringUtils.java
// public final class StringUtils {
// 
//     private StringUtils() {
//     }
// 
//     public static boolean isNotEmpty(final CharSequence charSequence) {
//         return charSequence != null && charSequence.length() > 0;
//     }
// }


// Path: src/main/java/com/github/xsavikx/androidscreencast/ui/JDialogError.java
import com.github.xsavikx.androidscreencast.exception.AndroidScreenCastRuntimeException;
import com.github.xsavikx.androidscreencast.exception.IORuntimeException;
import com.github.xsavikx.androidscreencast.util.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;

        errorDialogLabel = new JLabel();
        JScrollPane scrollPane = new JScrollPane();
        errorDescription = new JTextArea();
        errorDescription.setLineWrap(true);
        errorDescription.setWrapStyleWord(true);


        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout(5, 5));


        errorDialogLabel.setText(ex.getClass().getSimpleName());
        errorDialogLabel.setLabelFor(errorDescription);
        errorDialogLabel.setHorizontalAlignment(SwingConstants.CENTER);
        contentPane.add(errorDialogLabel, BorderLayout.NORTH);
        setErrorDetails(ex);

        scrollPane.setViewportView(errorDescription);
        contentPane.add(scrollPane, BorderLayout.CENTER);
        pack();
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setSize((int) screenSize.getWidth() >> 1, (int) screenSize.getHeight() >> 1);
        setLocationRelativeTo(null);
        setAlwaysOnTop(true);
    }

    private void setErrorDetails(Throwable e) {
        Throwable ex = getRealException(e);
        errorDialogLabel.setText(ex.getClass().getSimpleName());
        try (StringWriter stringWriter = new StringWriter()) {
            AndroidScreenCastRuntimeException realCause = getCause(ex);