Home | History | Annotate | Download | only in library_loader
      1 // Copyright 2014 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.base.library_loader;
      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 = LoaderErrors.LOADER_ERROR_NORMAL_COMPLETION;
     12 
     13     /**
     14      * @param errorCode This will be one of the LoaderErrors error codes.
     15      */
     16     public ProcessInitException(int errorCode) {
     17         mErrorCode = errorCode;
     18     }
     19 
     20     /**
     21      * @param errorCode This will be one of the LoaderErrors error codes.
     22      * @param throwable The wrapped throwable obj.
     23      */
     24     public ProcessInitException(int errorCode, Throwable throwable) {
     25         super(null, throwable);
     26         mErrorCode = errorCode;
     27     }
     28 
     29     /**
     30      * Return the error code.
     31      */
     32     public int getErrorCode() {
     33         return mErrorCode;
     34     }
     35 }
     36