Ejemplo n.º 1
0
 def save_to_db(self):
     try:
         db.session.add(self)
         db.session.commit()
     except exc.IntegrityError:
         raise exc.IntegrityError("", "", 1)
     except exc.InterfaceError:
         raise exc.InterfaceError("", "", 1)
Ejemplo n.º 2
0
 def save_to_db(self):
     try:
         db.session.add(self)
         db.session.commit()
     except exc.IntegrityError:
         raise exc.IntegrityError("", "", 1)
         traceback.print_exc(file=sys.stdout)
     except exc.InterfaceError:
         raise exc.InterfaceError("", "", 1)
     except:
         print("Unknown Error occurred")
Ejemplo n.º 3
0
 def save_to_db(self):
     try:
         db.session.add(self)
         db.session.commit()
     except exc.IntegrityError:
         raise exc.IntegrityError("", "", 1)
         print("The currency couldn't be saved to the database")
         traceback.print_exc(file=sys.stdout)
     except exc.InterfaceError:
         raise exc.InterfaceError("", "", 1)
     except:
         print("Unknown Error occurred")