mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-03-02 14:29:44 +00:00
ComputerCraft 1.79 initial upload
Added the complete source code to ComputerCraft 1.79 for Minecraft 1.8.9, plus newly written README and LICENSE files for the open source release.
This commit is contained in:
36
src/main/java/dan200/computercraft/api/lua/LuaException.java
Normal file
36
src/main/java/dan200/computercraft/api/lua/LuaException.java
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2016. This API may be redistributed unmodified and in full only.
|
||||
* For help using the API, and posting your mods, visit the forums at computercraft.info.
|
||||
*/
|
||||
|
||||
package dan200.computercraft.api.lua;
|
||||
|
||||
/**
|
||||
* An exception representing an error in Lua, like that raised by the error() function
|
||||
*/
|
||||
public class LuaException extends Exception
|
||||
{
|
||||
private final int m_level;
|
||||
|
||||
public LuaException()
|
||||
{
|
||||
this( "error", 1 );
|
||||
}
|
||||
|
||||
public LuaException( String message )
|
||||
{
|
||||
this( message, 1 );
|
||||
}
|
||||
|
||||
public LuaException( String message, int level )
|
||||
{
|
||||
super( message );
|
||||
m_level = level;
|
||||
}
|
||||
|
||||
public int getLevel()
|
||||
{
|
||||
return m_level;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user