I prefer sed
for text manipulation:
# cat test
1
Exception
2
Exception
3
4
Exception
5
Exception
6
7
8
Exception
9
# sed -i '/Exception/a =========================' test
# cat test
1
Exception
=========================
2
Exception
=========================
3
4
Exception
=========================
5
Exception
=========================
6
7
8
Exception
=========================
9