class MsoCommonUtils {

    protected MsoException ioExceptionToMsoException(IOException e, String context) {
        MsoAdapterException me = new MsoAdapterException(e.getMessage(), e);
        me.addContext(context);
        me.setCategory(MsoExceptionCategory.INTERNAL);

        // Always generate an alarm for internal exceptions
        logger.error("{} {} An exception occured on {}: ", MessageEnum.RA_GENERAL_EXCEPTION_ARG,
                ErrorCode.DataError.getValue(), context, e);

        return me;
    }

}