Thread
:
Throw error in calling plugin if call origin is a native
View Single Post
Author
Message
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
10-26-2014 , 14:47 Throw error in calling plugin if call origin is a native
#
1
I'm aware of both ThrowError and ThrowNativeError, but I need a universal function that will throw a native error if the call origin is from a native that I've implemented.
The reason for this is to keep the code that validates and throws errors close to the logic, but I want to avoid duplicated validation code in the native callback and internal code.
If the caller is another plugin, I simply want the error to bubble up to that plugin. If I called the function myself from within the plugin (from anything else than a native callback), it's my fault if something is not valid and my plugin should get the error.
Is this possible?
__________________
Richard Helgeby
Zombie:Reloaded
|
PawnUnit
|
Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby
View Public Profile
Send a private message to rhelgeby
Visit rhelgeby's homepage!
Find More Posts by rhelgeby