Sha256: c857e738cbd23661e66d29fec3216180459a9a7df018999c0fe1c53983115c09

Contents?: true

Size: 816 Bytes

Versions: 135

Compression:

Stored size: 816 Bytes

Contents

/** 
 * Copyright 2005-2007 Xue Yong Zhi
 * Distributed under the BSD License
 */

package com.xruby.runtime.lang;

/**
 * Anything that goes wrong at runtime.
 */
public class RubyException extends RuntimeException {
	
	private static final long serialVersionUID = 1L;

	private RubyExceptionValue value_ = null;

	public RubyException(String message) {
		this(RubyRuntime.ExceptionClass, message);
	}

	public RubyException(RubyClass exception_class, String message) {
		value_ = new RubyExceptionValue(exception_class, message);
	}

	public RubyException(RubyExceptionValue e) {
		value_ = e;
	}
	
	RubyExceptionValue getRubyValue() {
		value_.setException(this);
		return value_;
	}

	//To get a friendly message
	public String toString() {
		return value_.toString();
	}
}

Version data entries

135 entries across 135 versions & 2 rubygems

Version Path
rhodes-7.6.0 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-7.5.1 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-7.4.1 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-7.1.17 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-6.2.0 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-6.0.11 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.18 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.17 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.15 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.0.22 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.2 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.0.7 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.0.3 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-5.5.0 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
tauplatform-1.0.3 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
tauplatform-1.0.2 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
tauplatform-1.0.1 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-3.5.1.12 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-3.3.5 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java
rhodes-3.4.2 platform/shared/xruby/src/com/xruby/runtime/lang/RubyException.java