Trying to override loadimage.

BlitzMax Forums/BlitzMax Beginners Area/Trying to override loadimage.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I never use runtimeerror I just use Notify. Tho I did just try it like this:
Function LoadImage:TImage(Url:Object, Flags%=-1)
	
		Local Image:TImage
		
		Image = Brl.Max2D.LoadImage(Url, Flags)
		If Image = Null Then RuntimeError("The following image failed to load: " + String(Url) + ".  Please reinstall the game.")

		Return Image
		
	End Function
	

	Function LoadAnimImage:TImage(Url:Object, Cell_Width%, Cell_Height%, First_Cell%, Cell_Count%, Flags%=-1)
	
		Local Image:TImage

		Image = Brl.Max2D.LoadAnimImage(Url, Cell_Width, Cell_Height, First_Cell, Cell_Count, Flags)
		If Image = Null Then RuntimeError("The following image failed to load: " + String(Url) + ".  Please reinstall the game.")
		
		Return Image
		
	End Function

LoadImage("blah")


And it appers that it shows the error in the console when not in debug mode. I guess runtime error is for develops only.

edit:
what Dreamora said about try..catch