Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/common/ProcessInitException.java |
| diff --git a/content/public/android/java/src/org/chromium/content/common/ProcessInitException.java b/content/public/android/java/src/org/chromium/content/common/ProcessInitException.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ba29634ebd127dd768d61fedfb764a114debfc34 |
| --- /dev/null |
| +++ b/content/public/android/java/src/org/chromium/content/common/ProcessInitException.java |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2013 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.content.common; |
| + |
| +/** |
| + * The exception that is thrown when the intialization of a process was failed. |
| + */ |
| +public class ProcessInitException extends Exception { |
| + private int mErrorCode = 0; |
| + |
| + /** |
| + * @param errorCode The error code could be one from content/public/common/result_codes.h |
| + * or embedder. |
| + */ |
| + public ProcessInitException(int errorCode) { |
| + super(); |
|
Yaron
2013/01/08 00:54:22
Why is this necessary? Please remove.
michaelbai
2013/01/08 18:06:49
Done.
|
| + mErrorCode = errorCode; |
| + } |
| + |
| + /** |
| + * @param errorCode The error code could be one from content/public/common/result_codes.h |
| + * or embedder. |
| + * @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; |
| + } |
| +} |