Browse Source

New TRuntimeException constructor.

Brucey 3 years ago
parent
commit
b77102bc52
1 changed files with 8 additions and 8 deletions
  1. 8 8
      blitz.mod/blitz.bmx

+ 8 - 8
blitz.mod/blitz.bmx

@@ -239,15 +239,15 @@ bbdoc: Runtime exception
 about: Thrown by #RuntimeError.
 End Rem
 Type TRuntimeException Extends TBlitzException
-	Field error$
-	Method ToString$() Override
+	Field error:String
+
+	Method New(error:String)
+		Self.error = error
+	End Method
+
+	Method ToString:String() Override
 		Return error
 	End Method
-	Function Create:TRuntimeException( error$ )
-		Local t:TRuntimeException=New TRuntimeException
-		t.error=error
-		Return t
-	End Function
 End Type
 
 Rem
@@ -289,7 +289,7 @@ bbdoc: Generate a runtime error
 about: Throws a #TRuntimeException.
 End Rem
 Function RuntimeError( message$ )
-	Throw TRuntimeException.Create( message )
+	Throw New TRuntimeException( message )
 End Function
 
 Rem