1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shardingsphere.infra.exception.kernel.metadata;
19
20 import org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
21 import org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.MetaDataSQLException;
22
23
24
25
26 public final class TableNotFoundException extends MetaDataSQLException {
27
28 private static final long serialVersionUID = -2507596759730534895L;
29
30 public TableNotFoundException(final String tableName) {
31 super(XOpenSQLState.NOT_FOUND, 2, "Table or view '%s' does not exist.", tableName);
32 }
33
34 public TableNotFoundException(final String tableName, final String storageUnitName) {
35 super(XOpenSQLState.NOT_FOUND, 2, "Table or view '%s' does not exist in storage unit '%s'.", tableName, storageUnitName);
36 }
37 }