code: public Table getUserTable(Session session, String name, String schema) {
  
          Table t = findUserTable(session, name, schema);
  
          if (t == null) {
              throw Error.error(ErrorCode.X_42501, name);
          }
  
          return t;
      }
docs: Returns the specified user-defined table or view visible within the
  context of the specified Session. It excludes system tables and
  any temp tables created in different Sessions.
  Throws if the table does not exist in the context.