Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>import java.util.HashMap; import java.util.Map; import android.content.Context; import android.content.res.Resources; import com.cyberneticscore.voliastatis.R; public enum ExceptionEnums { NO_ERROR(1), CONNECTION_ERROR(2), LOGIN_ERROR (3), SSL_ERROR (4), WRONG_DATE (5), INTERRUPTED (6), CLIENT_PROTOCOL_ERROR(7), UNKNOWN_HOST_ERROR(8), IO_ERROR (9), XPATHER_ERROR(10); private static final Map&lt;Integer, String&gt; map = new HashMap&lt;Integer, String&gt;(); private static Context context; private static Resources reso; public static void getContext(Context _context) { context =_context; reso = context.getResources(); } private int pos; public static void putMapValues(){ //static{ map.put(NO_ERROR.getPos(), reso.getString(R.string.exceptions_no_error)); map.put(CONNECTION_ERROR.getPos(), reso.getString(R.string.exceptions_connection_error)); map.put(LOGIN_ERROR.getPos(), reso.getString(R.string.exceptions_login_error)); map.put(SSL_ERROR.getPos(), reso.getString(R.string.exceptions_ssl_error)); map.put(WRONG_DATE.getPos(), reso.getString(R.string.exceptions_wrong_date)); map.put(INTERRUPTED.getPos(), reso.getString(R.string.exceptions_interrupted)); map.put(CLIENT_PROTOCOL_ERROR.getPos(), reso.getString(R.string.exceptions_client_protocol_error)); map.put(UNKNOWN_HOST_ERROR.getPos(), reso.getString(R.string.exceptions_unknown_host_error)); map.put(IO_ERROR.getPos(), reso.getString(R.string.exceptions_io_error)); map.put(XPATHER_ERROR.getPos(), reso.getString(R.string.exceptions_xpather_error)); } ExceptionEnums(int pos){ this.pos = pos; } public int getPos(){ return pos; } public static String getErrorDescription(int position_number){ return map.get(position_number); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload