MB2 138a: Making A Bracha on Good and Bad News (222:1-4)

On hearing good news one makes either a shehechiyanu or hatov v'hametiv. On hearing bad news, one makes the bracha of dayan haemet. What are the parameters?