Commits

pjenvey  committed 50f73c8

[svn] raise a TypeError instead of r1779's string exception

  • Participants
  • Parent commits 30b03a9

Comments (0)

Files changed (1)

File webhelpers/pagination/orm.py

             return SQLAlchemyLazyMapper(obj, *args, **kw)
         if isinstance(obj, sqlalchemy.Table):
             return SQLAlchemyLazyTable(obj, *args, **kw)
-    raise "You must call paginate() with either a sequence, an SQLObject " + \
-          "class or an SQLAlchemy query object."
+    raise TypeError("You must call paginate() with either a sequence, an "
+                    "SQLObject class or an SQLAlchemy query object.")
     
 
 class SQLObjectLazy(Partial):