function clear_errors( $emask = null ) {
		foreach( $this->err_stack as $t => $ids ) {
			if( $emask !== NULL && ( $emask & $t ) == 0 ) {
				// ignore this error
				continue;
			}
			// clear these errors
			foreach( $ids as $id ){
				$Err = PLUGError::get_reference( $t, $id );
				$Err->clear();
			}
			unset( $this->err_stack[$t] );
		}
	}