added color coded legend and exception type from doc comment