Raised This Month: $51 Target: $400
 12% 

Throw error in calling plugin if call origin is a native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 10-26-2014 , 14:47   Throw error in calling plugin if call origin is a native
Reply With Quote #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 is offline
Send a message via MSN to rhelgeby
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode