add table.cc and change exception skeleton