You might want to use LIZARDFS_CREATE_EXCEPTION_CLASS macro