Explicitly export exception types. (#2999) * Set visibility of exceptions to default. Co-authored-by: XZiar <czktc2007@gmail.com> * add test * update docs * Skip failed test.