GithubHelp home page GithubHelp logo

Future release features about cloudbridge HOT 3 CLOSED

cloudve avatar cloudve commented on August 28, 2024
Future release features

from cloudbridge.

Comments (3)

VJalili avatar VJalili commented on August 28, 2024

Wrap all exceptions in cloudbridge equivalents

I would vote for this to get a higher priority ;-)

from cloudbridge.

nuwang avatar nuwang commented on August 28, 2024

Some possible strategies for wrapping exceptions and handling other cross-cutting concerns:

  1. Do it individually at base class level
    def create(....):
        do_standard_logging()
        try:
             _create_impl()
        except Exception as e:
            if isinstance(e, CloudBridgeException):
               raise e
           else:
               raise CloudBridgeException(e) from e
  1. Do it globally
    https://stackoverflow.com/questions/16961914/python-logging-all-of-a-class-methods-without-decorating-each-one

  2. Use an AOP library
    https://stackoverflow.com/questions/286958/any-aop-support-library-for-python

from cloudbridge.

VJalili avatar VJalili commented on August 28, 2024

Given my .NET background, I generally prefer:

  • implement a concrete logic as to avoid exceptions as much as possible; basically you prevent or have multiple backup plans for exceptions.
  • handle un-avoidable exceptions globally.

from cloudbridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.