added putc to Stdio.
renamed/refactored some encoding conversion functions. added stix_errnumtoerrstr(). added generr.st to generate error string code
This commit is contained in:
		@ -332,10 +332,39 @@
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
(* --------------------
 | 
			
		||||
#pooldic Error
 | 
			
		||||
{
 | 
			
		||||
	#NONE := error(0).
 | 
			
		||||
	#GENERIC := error(1).
 | 
			
		||||
	#
 | 
			
		||||
}
 | 
			
		||||
------------------- *)
 | 
			
		||||
 | 
			
		||||
#class Error(Apex)
 | 
			
		||||
{
 | 
			
		||||
	(* ----------------------------
 | 
			
		||||
	TODO: support constant declaration...
 | 
			
		||||
 | 
			
		||||
	#const
 | 
			
		||||
	{
 | 
			
		||||
		#NONE := error(0).
 | 
			
		||||
		#GENERIC := error(1).
 | 
			
		||||
	}
 | 
			
		||||
	-------------------------------- *)
 | 
			
		||||
 | 
			
		||||
	#method isError
 | 
			
		||||
	{
 | 
			
		||||
		^true
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	#method asInteger
 | 
			
		||||
	{
 | 
			
		||||
		<primitive: #_error_as_integer>
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	#method asString
 | 
			
		||||
	{
 | 
			
		||||
		<primitive: #_error_as_string>
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user