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.
5 package org.chromium.mojo.system;
8 * Exception for the core mojo API.
10 public class MojoException extends RuntimeException {
12 private final int mCode;
17 public MojoException(int code) {
22 * The mojo result code associated with this exception. See {@link MojoResult} for possible
25 public int getMojoResult() {
30 * @see Object#toString()
33 public String toString() {
34 return "MojoResult(" + mCode + "): " + MojoResult.describe(mCode);