Skip to content

Commit a9d98bc

Browse files
committed
Specify type of exception in try expect block
1 parent acc02bb commit a9d98bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Examples/Modules/nuclear_fusion/analysis_proton_boron_fusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def add_species_to_dict(yt_ad, data_dict, species_name, prefix, suffix):
114114
try:
115115
## If species exist, we add its data to the dictionary
116116
add_existing_species_to_dict(yt_ad, data_dict, species_name, prefix, suffix)
117-
except:
117+
except yt.utilities.exceptions.YTFieldNotFound:
118118
## If species does not exist, we avoid python crash and add empty arrays to the
119119
## dictionnary. Currently, this happens for the boron species in test number 4, which
120120
## entirely fuses into alphas.

0 commit comments

Comments
 (0)