Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the list of Android specific exceptions?

Tags:

android

I know some of exceptions are thrown by Android framework. Like ActivityNotFoundException, WindowManager.BadTokenException.

But i am not aware of all other exceptions which are specific to android framework.

Can anybody list possible Android framework specific exceptions with a small description. Or suggest me blogs information which contains the required information.

like image 216
Raghu Mudem Avatar asked Oct 08 '15 09:10

Raghu Mudem


People also ask

What are Android specific exceptions?

Only choose the one started by "Android", here are about 72 exceptions, these should be the list android.content.ActivityNotFoundException android.util.AndroidRuntimeException android.accounts.AuthenticatorException android.

How many types of exceptions are there in Java?

There are mainly two types of exceptions in Java as follows: Checked exception. Unchecked exception.

How are exceptions handled in Android?

How Exceptions Work in JVM and Android. In Java, all exception and error types are subclasses of Throwable. The Throwable class changes the execution flow of JVM apps by throwing exceptions and deciding how to recover from an error. Adding an exception to a code changes its execution flow.


2 Answers

The following are the exceptions that are supported by Android:

1.) InflateException : This exception is thrown When an error conditions are occurred.

2.) Surface.OutOfResourceException: This exception is thrown When a surface is not created or resized.

3.) SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS

4.) WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.

like image 28
KishuDroid Avatar answered Nov 20 '22 12:11

KishuDroid


http://developer.android.com/reference/java/lang/Exception.html I think here you can find it, "Known Indirect Subclasses", totally 224 exceptions. Only choose the one started by "Android", here are about 72 exceptions, these should be the list

android.content.ActivityNotFoundException
android.util.AndroidRuntimeException
android.accounts.AuthenticatorException
android.os.BadParcelableException
android.util.Base64DataException
android.hardware.camera2.CameraAccessException
android.database.CursorIndexOutOfBoundsException
android.os.DeadObjectException
android.media.DeniedByServerException
android.support.v4.app.Fragment.InstantiationException
android.opengl.GLException
android.view.InflateException
android.content.IntentFilter.MalformedMimeTypeException
android.content.IntentSender.SendIntentException
android.view.KeyCharacterMap.UnavailableException
android.security.keystore.KeyExpiredException
android.security.keystore.KeyNotYetValidException
android.security.keystore.KeyPermanentlyInvalidatedException
android.util.MalformedJsonException
android.media.MediaCodec.CodecException
android.media.MediaCodec.CryptoException
android.media.MediaDrm.MediaDrmStateException
android.media.MediaDrmResetException
android.accounts.NetworkErrorException
android.os.NetworkOnMainThreadException
android.util.NoSuchPropertyException
android.media.NotProvisionedException
android.support.v4.os.OperationCanceledException
android.content.pm.PackageManager.NameNotFoundException
android.os.ParcelFileDescriptor.FileDescriptorDetachedException
android.os.ParcelFormatException
android.net.ParseException
android.app.PendingIntent.CanceledException
android.support.v8.renderscript.RSDriverException
android.support.v8.renderscript.RSIllegalArgumentException
android.support.v8.renderscript.RSInvalidStateException
android.support.v8.renderscript.RSRuntimeException
android.content.ReceiverCallNotAllowedException
android.os.RemoteException
android.widget.RemoteViews.ActionException
android.media.ResourceBusyException
android.content.res.Resources.NotFoundException
android.database.SQLException
android.database.sqlite.SQLiteAbortException
android.database.sqlite.SQLiteAccessPermException
android.database.sqlite.SQLiteBindOrColumnIndexOutOfRangeException
android.database.sqlite.SQLiteBlobTooBigException
android.database.sqlite.SQLiteCantOpenDatabaseException
android.database.sqlite.SQLiteConstraintException
android.database.sqlite.SQLiteDatabaseCorruptException
android.database.sqlite.SQLiteDatabaseLockedException
android.database.sqlite.SQLiteDatatypeMismatchException
android.database.sqlite.SQLiteDiskIOException
android.database.sqlite.SQLiteDoneException
android.database.sqlite.SQLiteException
android.database.sqlite.SQLiteFullException
android.database.sqlite.SQLiteMisuseException
android.database.sqlite.SQLiteOutOfMemoryException
android.database.sqlite.SQLiteReadOnlyDatabaseException
android.database.sqlite.SQLiteTableLockedException
android.provider.Settings.SettingNotFoundException
android.database.StaleDataException
android.view.Surface.OutOfResourcesException
android.view.SurfaceHolder.BadSurfaceTypeException
android.nfc.TagLostException
android.util.TimeFormatException
android.os.TransactionTooLargeException
android.media.UnsupportedSchemeException
android.security.keystore.UserNotAuthenticatedException
android.view.WindowManager.BadTokenException
android.view.WindowManager.LayoutParams#token
android.view.WindowManager.InvalidDisplayException
like image 94
Cook Chen Avatar answered Nov 20 '22 12:11

Cook Chen