with Log;
with Errors;
with Profile;
with Defaults;
with Arguments;
with Debug_Tools;
procedure Display_Defaults (For_User : in String := "<CURRENT_USER>";
                            Response : in String := "<PROFILE>") is
    --
    Old_Response_Profile : Profile.Response_Profile := Profile.Get;
    New_Response_Profile : Profile.Response_Profile := Profile.Value (Response);
    --
    package Error is
       new Errors  
              (Old_Response_Profile, New_Response_Profile, "Display_Defaults");
    --
begin
    Profile.Set (New_Response_Profile);
    Log.Put_Line ("[Display_Defaults (For_User => """ & For_User &
                  """, Response => """ & Response & """)]",
                  Profile.Auxiliary_Msg);  
    declare
        The_User : constant String := Arguments.User_From (For_User);
    begin
        Log.Put_Line ("DEFAULTS FOR USER """ & The_User & """:",
                      Profile.Positive_Msg);
        Log.Put_Line ("CATALOG => """ & Defaults.Catalog (The_User) & """");
        Log.Put_Line ("VERSION => """ & Defaults.Version (The_User) & """");
    end;
    Log.Put_Line ("[end of Display_Defaults operation--no error(s) detected]");
    Profile.Set (Old_Response_Profile);
    --
exception
    when Arguments.Invalid_Username =>
        Error.Report ("Specified username is invalid");
    when Defaults.Io_Failure =>
        Error.Report ("Can't find defaults for specified user");
    when Error.Propagate =>
        raise;
    when Error.Quit =>
        null;
    when others =>
        Error.Report ("EXCEPTION: " & Debug_Tools.Get_Exception_Name,
                      Profile.Exception_Msg);
        --
end Display_Defaults;