Back to project page mobile2-android.
The source code is released under:
Apache License
If you think the Android project mobile2-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ecollege.android.errors; //from ww w . j a va 2 s . c o m import com.ecollege.android.R; import android.content.Context; @SuppressWarnings("serial") public abstract class ECollegeException extends RuntimeException { protected Context ctx; protected Throwable source; protected int errorMessageId; public ECollegeException(Context ctx, int errorMessageId) { this.ctx = ctx; this.errorMessageId = errorMessageId; } public ECollegeException(Context ctx, int errorMessageId, Throwable source) { this.ctx = ctx; this.errorMessageId = errorMessageId; this.source = source; } public ECollegeException(Context ctx, Throwable source) { this.source = source; this.errorMessageId = R.string.e_unhandled_exception; this.ctx = ctx; } public int getErrorMessageId() { return errorMessageId; } public Throwable getSource() { return source; } @Override public String toString() { return ctx.getString(errorMessageId); } }