anchor.diff:                        {Node, latest(Period, Node, Bucket, Step, N)}
                 end, Nodes, length(Nodes));
   latest(Period, Node, Bucket, Step, N) when is_atom(Node) ->
  -    resample(table(Node, Bucket, Period), Step, N).
  +    try resample(table(Node, Bucket, Period), Step, N) of
  +        Result -> {ok, Result}
  +    catch
  +        Type:Err -> {error, {Type, Err}}
  +    end.
   
   
   latest_all(Period, Bucket) ->
  
positive.code: 
  
  latest(Period, Node, Bucket, N) when is_atom(Node), is_list(Bucket) ->
      walk(table(Node, Bucket, Period), N);
  latest(Period, Nodes, Bucket, N) when is_list(Nodes), is_list(Bucket) ->
      misc:pmap(fun (Node) ->
                        {Node, latest(Period, Node, Bucket, N)}
  
negative.code: 
  %% @doc Get the latest samples for a given interval from the archive
  latest(Period, Node, Bucket) when is_atom(Node) ->
      try mnesia:transaction(
            fun () ->
                    Tab = table(Node, Bucket, Period),
                    Key = mnesia:last(Tab),
                    hd(mnesia:read(Tab, Key))
            end) of
          {atomic, Result} ->
              {ok, Result};
          Err ->
              {error, Err}
      catch
          Type:Err -> {error, {Type, Err}}
      end;
  latest(Period, Nodes, Bucket) when is_list(Nodes), is_list(Bucket) ->
      misc:pmap(fun (Node) ->
                        {Node, latest(Period, Node, Bucket)}
  