Merge branch '34-make-field-not-found-error-message-include-event-data' into 'master'
Resolve "Make 'field not found' error message include event data" Closes #34 See merge request micro-ROS/ros_tracing/ros2_tracing!67
This commit is contained in:
		
						commit
						5f370a65db
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -84,7 +84,7 @@ def get_field(event: DictEvent, field_name: str, default=None, raise_if_not_foun
 | 
			
		|||
    field_value = event.get(field_name, default)
 | 
			
		||||
    # If enabled, raise exception as soon as possible to avoid headaches
 | 
			
		||||
    if raise_if_not_found and field_value is None:
 | 
			
		||||
        raise AttributeError(f'event field "{field_name}" not found!')
 | 
			
		||||
        raise AttributeError(f"event field '{field_name}' not found for event: {event}")
 | 
			
		||||
    return field_value
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue