newgrounds io shit incoming
This commit is contained in:
20
source/io/newgrounds/objects/Error.hx
Normal file
20
source/io/newgrounds/objects/Error.hx
Normal file
@ -0,0 +1,20 @@
|
||||
package io.newgrounds.objects;
|
||||
class Error {
|
||||
|
||||
public var code(default, null):Int;
|
||||
public var message(default, null):String;
|
||||
|
||||
public function new (message:String, code:Int = 0) {
|
||||
|
||||
this.message = message;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public function toString():String {
|
||||
|
||||
if (code > 0)
|
||||
return '#$code - $message';
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user