]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
NotSupportedError is a DBAPI wrapper which takes four args and is expected to origina...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 11 Jan 2009 23:37:19 +0000 (23:37 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 11 Jan 2009 23:37:19 +0000 (23:37 +0000)
Moved those error throws to CompileError/InvalidRequestError.

lib/sqlalchemy/databases/mssql.py
lib/sqlalchemy/databases/sybase.py
lib/sqlalchemy/sql/compiler.py

index 11b1027c250a432ec82f7ecc7d7938f43f88b428..7d23c5b27365cc700b42acc032ff92ad6c83dd58 100644 (file)
@@ -1585,7 +1585,7 @@ class MSSQLCompiler(compiler.DefaultCompiler):
                               [self.process(x) for x in insert_stmt._prefixes])
 
             if not colparams and not self.dialect.supports_default_values and not self.dialect.supports_empty_insert:
-                raise exc.NotSupportedError(
+                raise exc.CompileError(
                     "The version of %s you are using does not support empty inserts." % self.dialect.name)
             elif not colparams and self.dialect.supports_default_values:
                 return (insert + " INTO %s DEFAULT VALUES" % (
index 3cc97e9c45afbfaed56075442c77e116a3d88848..6007315f264334c502eaf09565bd3005da5d9f0c 100644 (file)
@@ -160,11 +160,11 @@ class SybaseTypeError(sqltypes.TypeEngine):
 
     def bind_processor(self, dialect):
         def process(value):
-            raise exc.NotSupportedError("Data type not supported", [value])
+            raise exc.InvalidRequestError("Data type not supported", [value])
         return process
 
     def get_col_spec(self):
-        raise exc.NotSupportedError("Data type not supported")
+        raise exc.CompileError("Data type not supported")
 
 class SybaseNumeric(sqltypes.Numeric):
     def get_col_spec(self):
index b286398bfcddcec8eb7ed4dc0c89c87cb54fa29e..7f7fb4ef0fb2b418f0399bf1c9e347f6474e297b 100644 (file)
@@ -599,7 +599,7 @@ class DefaultCompiler(engine.Compiled):
                           [self.process(x) for x in insert_stmt._prefixes])
 
         if not colparams and not self.dialect.supports_default_values and not self.dialect.supports_empty_insert:
-            raise exc.NotSupportedError(
+            raise exc.CompileError(
                 "The version of %s you are using does not support empty inserts." % self.dialect.name)
         elif not colparams and self.dialect.supports_default_values:
             return (insert + " INTO %s DEFAULT VALUES" % (