class ErrorMessageFactory {

    public static String create( Context context, Exception exception ) {

        String message = context.getString( R.string.exception_message_generic );

        if( exception instanceof NetworkConnectionException ) {

            message = context.getString( R.string.exception_message_no_connection );

        } else if( exception instanceof ProgramNotFoundException ) {

            message = context.getString( R.string.exception_message_program_not_found );

        }

        return message;
    }

    private  ErrorMessageFactory();

}