adding ability for differant error type, and commenting

Change-Id: Id80a3b1de4b2d00793842b55104ce7c9b28090b0