diff options
Diffstat (limited to 'base/android/java/src/org/chromium/base/library_loader/ProcessInitException.java')
-rw-r--r-- | base/android/java/src/org/chromium/base/library_loader/ProcessInitException.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/base/android/java/src/org/chromium/base/library_loader/ProcessInitException.java b/base/android/java/src/org/chromium/base/library_loader/ProcessInitException.java new file mode 100644 index 0000000000..106667536d --- /dev/null +++ b/base/android/java/src/org/chromium/base/library_loader/ProcessInitException.java @@ -0,0 +1,35 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.base.library_loader; + +/** + * The exception that is thrown when the intialization of a process was failed. + */ +public class ProcessInitException extends Exception { + private int mErrorCode = LoaderErrors.LOADER_ERROR_NORMAL_COMPLETION; + + /** + * @param errorCode This will be one of the LoaderErrors error codes. + */ + public ProcessInitException(int errorCode) { + mErrorCode = errorCode; + } + + /** + * @param errorCode This will be one of the LoaderErrors error codes. + * @param throwable The wrapped throwable obj. + */ + public ProcessInitException(int errorCode, Throwable throwable) { + super(null, throwable); + mErrorCode = errorCode; + } + + /** + * Return the error code. + */ + public int getErrorCode() { + return mErrorCode; + } +} |