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