anchor.diff:      end.
   
   init(InitArgs) ->
  -    try
  -        do_init(InitArgs)
  -    catch
  -    throw:{unauthorized, DbUri} ->
  -        {stop, {unauthorized,
  -            <<"unauthorized to access or create database ", DbUri/binary>>}};
  -    throw:{db_not_found, DbUri} ->
  -        {stop, {db_not_found, <<"could not open ", DbUri/binary>>}};
  -    throw:Error ->
  -        {stop, Error}
  -    end.
  +    {ok, InitArgs, 0}.
   
   do_init(#rep{options = Options, id = {BaseId, Ext}} = Rep) ->
       process_flag(trap_exit, true),
  
positive.code:         [BaseId ++ Ext, Source, Target, to_binary(Reason)]),
      terminate_cleanup(State),
      couch_replicator_notifier:notify({error, RepId, Reason}),
      couch_replicator_manager:replication_error(Rep, Reason).
  
  
  terminate_cleanup(State) ->
      update_task(State),
  
negative.code:     couch_replicator_notifier:notify({error, RepId, <<"cancelled">>}),
      terminate_cleanup(State);
  
  terminate(Reason, #rep_state{} = State) ->
      #rep_state{
          source_name = Source,
          target_name = Target,
  