throw Error exceptions in favor of assert()

do not use assert() anymore
removed AssertionError
fixes constant for StringEncodingError (-10 was in use by OSError)
do not throw RuntimeError; use more specific Error