added ThrowError() a la amxmodx's abort()

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40566
This commit is contained in:
David Anderson
2007-03-02 19:10:44 +00:00
parent 9de900d3eb
commit 66b244011e
5 changed files with 55 additions and 2 deletions
+13 -1
View File
@@ -37,7 +37,6 @@ struct Plugin
#include <bitbuffer>
#include <sorting>
#include <clients>
#include <entity>
/**
* Declare this as a struct in your plugin to expose its information.
@@ -106,6 +105,18 @@ forward OnGameFrame();
*/
native Handle:GetMyHandle();
/**
* Aborts the current callback and throws an error. This function
* does not return in that no code is executed following it.
*
* @param format String format.
* @param ... Format arguments.
* @noreturn
* @error Always!
*/
native ThrowError(const String:fmt[], {Handle,Float,String,_}:...);
/**
* Logs a generic message to the HL2 logs.
*
@@ -210,3 +221,4 @@ native GetCurrentMap(String:buffer[], maxlength);
#include <usermessages>
#include <helpers>
#include <entity>