Garry's Mod Wiki

ProtectedCall

ProtectedCall

  boolean ProtectedCall( function func )

Description

Runs a function without stopping the whole script on error.

This function is similar to pcall and xpcall except the errors are still printed and sent to the error handler (i.e. sent to server console if clientside and GM:OnLuaError called).

Arguments

1 function func
Function to run

Returns

1 boolean
Whether the function executed successfully or not

Special Pages


Wikis

?

Render Time: 58ms

DB GetPage 35
Generate Html 5
SaveChanges (1) 8
Render Body 0
Render Sidebar 8