Skip to content

Improve formatting of logged errors #37

@bpbecker

Description

@bpbecker

A recent change tried to improve the display of logged errors by adding line wrapping and indentation - resulting in display like the following:

*** Errors logged with setup "setup_httpcommand_test":                                                                                       
  test_restful_get: code returned numeric scalar = 0 when DTest expected an empty charvec to indicate success                                
    test_get_url: code returned numeric scalar = 0 when DTest expected an empty charvec to indicate success                                  
    test_chunked: code returned character value = "                                                                                          
    [rc: 11 | msg: DOMAIN ERROR occurred during response payload conversion (Data was not converted) | HTTP Status: 200 "OK" | ≢Data: 33653]"
  when DTest expected an empty charvec to indicate success                                                                                   
    test_BaseURL: code returned character value = "                                                                                          
    Unexpected result when URL and BaseURL are specified"                                                                                    
  when DTest expected an empty charvec to indicate success                                                                                   
    test_deflate: code returned character value = " VALUE ERROR  Undefined name: result "                                                    
  when DTest expected an empty charvec to indicate success                                                                                   
    test_timeout: code returned character value = "Timeout test failed"                                                                      
  when DTest expected an empty charvec to indicate success   

Previously the display (see below) had one line per error which I think is easier to interpret, even if the line extends beyond the screen width.

   *** Errors logged  with setup "setup_httpcommand_test":                                                                                                                                                                                              
       test_timeout: code returned character value = "Timeout test failed" when DTest expected an empty charvec to indicate success                                                                                                                     
       test_get_url: code returned numeric scalar = 0 when DTest expected an empty charvec to indicate success                                                                                                                                          
       test_restful_get: code returned numeric scalar = 0 when DTest expected an empty charvec to indicate success                                                                                                                                      
       test_chunked: code returned character value = "[rc: 11 | msg: DOMAIN ERROR occurred during response payload conversion (Data was not converted) | HTTP Status: 200 "OK" | ≢Data: 33653]" when DTest expected an empty charvec to indicate success
       test_deflate: code returned character value = " VALUE ERROR  Undefined name: result " when DTest expected an empty charvec to indicate success                                                                                                   
       test_BaseURL: code returned character value = "Unexpected result when URL and BaseURL are specified" when DTest expected an empty charvec to indicate success                                                                                    

To address this issue we should look at both the formatting and content of the error messages.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions