| 1 | // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | package org.chromium.content.common; |
| 6 | |
| 7 | /** |
| 8 | * The exception that is thrown when the intialization of a process was failed. |
| 9 | */ |
| 10 | public class ProcessInitException extends Exception { |
| 11 | private int mErrorCode = 0; |
| 12 | |
| 13 | /** |
| 14 | * @param errorCode The error code could be one from content/public/common/result_codes.h |
| 15 | * or embedder. |
| 16 | */ |
| 17 | public ProcessInitException(int errorCode) { |
| 18 | mErrorCode = errorCode; |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * @param errorCode The error code could be one from content/public/common/result_codes.h |
| 23 | * or embedder. |
| 24 | * @param throwable The wrapped throwable obj. |
| 25 | */ |
| 26 | public ProcessInitException(int errorCode, Throwable throwable) { |
| 27 | super(null, throwable); |
| 28 | mErrorCode = errorCode; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Return the error code. |
| 33 | */ |
| 34 | public int getErrorCode() { |
| 35 | return mErrorCode; |
| 36 | } |
| 37 | } |