Search
 
SCRIPT & CODE EXAMPLE
 

LUA

lua catch error

-- The pcall (f, arg1, ...) function calls the requested function in
-- protected mode. If some error occurs in function f, it does not throw
-- an error. It just returns the status of error. A simple example using
-- pcall is shown below.

Live Demo
function myfunction ()
   n = n/nil
end

if pcall(myfunction) then
   print("Success")
else
	print("Failure")
end
Comment

PREVIOUS NEXT
Code Example
Lua :: enable http service roblox 
Lua :: roblox lua scripts 
Lua :: lua table of alphabet 
Lua :: how to activate a command if someone wears a accessory in lua roblox 
Matlab :: matlab how to set figure size so you can see plot 
Matlab :: matlab for loop matrix 
Matlab :: matlab number to string 
Matlab :: matlab root finding function 
Matlab :: matlab symbolic integration 
Matlab :: two return variables in matlab 
Matlab :: matlab text subscript 
Basic :: how to close form in vb.net 
Basic :: ogg to mp3 
Basic :: vb.net printing set page size 
Elixir :: elixir ecto query to sql 
Elixir :: elixir get_in access all 
Elixir :: liveview component update 
Scala :: new scala project 
Scala :: scala list all permutations 
Actionscript :: vivo y11 not connecting to wifi after update 
Excel :: excel get number of column 
Perl :: perl until loop 
Perl :: perl download images files 
Pascal :: Pascal (fpc 3.0.4) sample 
Gdscript :: godot get root node 
Abap :: adobre forms abap tcode 
Assembly :: error: failed to synchronize all the database archlinux 
Assembly :: sort in assembly pcspim 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: jquery unselect option 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =