CXM_errors.anubis 1.01 KB
/*
 * Created by PyramIDE.
 * User: ricard
 * Date: 16/09/2007
 * Time: 21:10
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

public type GeneralError:
	ok,
	unknown(Word32 val),
	bad_type,
	bad_value,
	bad_parameters,
	no_init,
	unknown_command,
	wrong_authentification,	// Wrong login or password
	access_denied,					// login ok but no suffisiant right to access to this area. Can be use with wrong authentification too...
	io_error,								// general error on reading or writing from/to IO (file, socket, etc...)
	cant_start_process.			// A execute to an external process has failed

public define Word32 
	to_Word32
	(
		GeneralError e
	) =
	if e is
	{
		ok											then 0,
		unknown(val)						then val,
		bad_type								then 0x1,
		bad_value								then 0x2,
		bad_parameters					then 0x3,
		no_init									then 0x4,
		unknown_command					then 0x5,
		wrong_authentification	then 0x6,
		access_denied						then 0x7,
		io_error								then 0x8,
		cant_start_process			then 0x9,
	}.