mirror of
				https://github.com/pocketpy/pocketpy
				synced 2025-10-31 00:40:16 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			773 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			773 B
		
	
	
	
	
	
	
	
| title | icon | order | 
|---|---|---|
| Error Handling | dot | 5 | 
bool pkpy_clear_error(pkpy_vm*, char** message)
- If a method returns false, call the pkpy_clear_errormethod to check the error and clear it
- If pkpy_clear_errorreturns false, it means that no error was set, and it takes no action
- If pkpy_clear_errorreturns true, it means there was an error and it was cleared. It will provide a string summary of the error in the message parameter if it is notNULL.
!!!
You are responsible for freeing message.
!!!
bool pkpy_check_error(pkpy_vm*)
Return true if the vm is currently in an error state.
bool pkpy_error(pkpy_vm*, const char* name, pkpy_CString message)
Set the error state of the vm. It is almost equivalent to raise in python.