C Api Design Error Handling
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Api Error Handling Best Practices
this site About Us Learn more about Stack Overflow the company Business web api error handling Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask rest api error handling Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up
Rails Api Error Handling
Error handling design for a C++ API up vote 15 down vote favorite 4 I am writing a C++ API on Windows with VS 2010 which exports several classes from a DLL. We are planing to support other platforms later (MacOS, Linux). I am currently thinking how to design the error handling. I don't want to use exceptions because of the problem across
Objective C Error Handling
DLL boundaries (at least in Windows). I came up with the following three designs so far. Design 1: For each method the return value would indicate if the operation succeeded or failed by returning either true/false or pointer/nullptr, respectively. The client might then call GetLastError() to retrieve an error code (enum) which details the last failure. typedef std::shared_ptr
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings c error handling goto and policies of this site About Us Learn more about Stack Overflow
Http Status Codes
the company Business Learn more about hiring developers or posting ads with us Programmers Questions Tags Users Badges Unanswered Ask Question _ Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a http://stackoverflow.com/questions/9323907/error-handling-design-for-a-c-api minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top The modern way to perform error handling… up vote 104 down vote favorite 31 I've been pondering this problem for a while now and find myself continually finding caveats and contradictions, so I'm http://programmers.stackexchange.com/questions/147059/the-modern-way-to-perform-error-handling hoping someone can produce a conclusion to the following: Favour exceptions over error codes As far as I'm aware, from working in the industry for four years, reading books and blogs, etc. the current best practice for handling errors is to throw exceptions, rather than returning error codes (not necessarily an error code, but a type representing an error). But - to me this seems to contradict... Coding to interfaces, not implementations We code to interfaces or abstractions to reduce coupling. We don't know, or want to know, the specific type and implementation of an interface. So how can we possibly know what exceptions we should be looking to catch? The implementation could throw 10 different exceptions, or it could throw none. When we catch an exception surely we're making assumptions about the implementation? Unless - the interface has... Exception specifications Some languages allow developers to state that certain methods throw certain exceptions (Java for example, uses the throws keyword.) From the calling code's point of view this seems fine - we know explicitly which excep
APIxIdentity APIxOpen Banking APIxAPI EcosystemsAmazon Web Services and ApigeePivotal Cloud Foundry and ApigeeCustomersSuccess StoriesVideosDevelopersConnect & LearnApigee CommunityResources GalleryEventsDocumentationBlogSupportAdapt or Die World TourSearchSign up FreeSign In 32196 API Best Practices: Platform Deployment Models 32126 How Organizations Adapt to Digital 32071 API Best Practices: Microservices 31991 Adapt or Die: Do Platforms Beat Products? 31776 http://apigee.com/about/blog/technology/restful-api-design-what-about-errors API Best Practices: Security 31666 Three Things Companies Must Do to Attract Develope... 31526 Guts, Glory, and APIs 31441 Apigee Edge Private Cloud 4.16.09 Release Is Out! 31236 Blue/Green Deployment: Replacing a Plane's En... 31071 Nationwide: Building Trust with APIs 31066 Connecting Microservices and APIs to Business Valu... 30791 Why Digital Transformation Is About People 30796 Apigee to Join Google 30711 Developers Who Use error handling Their Own Products Build Better... 30546 L.L.Bean's API Journey: Digital Commerce Done... 30486 Are ESBs Relevant in the Age of Microservices? 30426 Rearchitecting Analytics @ Apigee 30416 How to Build an API Initiative That Doesn’t Suck 30246 Keanu Reeves Made the Right Decision. Will You? 30116 Kubernetes Authentication for the Enterprise 29786 Apigee API Management Available for Apps in AWS Ma... 29831 Ticketmaster Brings the api error handling DevJam to San Jose! 29706 Why Apigee Auto-Scaling Matters 29626 Adapt or Die: It's Time To Go Big With APIs 29191 What's Better Than Microservices? Serverless... 28651 Shutterfly: Scaling Legacy Systems with APIs 28926 Uber's APIs: Giving Developers the Keys to In... 27686 Introducing the Apigee Commerce APIx Solution 28646 How to Make Your Apigee Edge-Okta Integration Seam... 28551 PSD2: An Opportunity for Lenders to Leap Into Open... 28381 Apigee Labs: Add Key Functionality to Your APIs 28246 Why Every CIO Needs to Know That Some APIs Don... 28161 T-Mobile: From IT to Advantage 27621 The Apigee API Platform: Commonality Across Use Ca... 27416 App Performance Monitoring Is Now Open Source 27366 Retail APIs: A Roadmap for All Digital Initiatives 27026 Why CTOs Have Been Thinking About Intelligence All... 27031 Cloud Deployments Done Right: Why APIs Are Key 26421 Glh Hotels: Instant ROI with APIs 26341 APIs Aren't Enough 26206 The Internet Doesn't Run on a Bus—Your APIs S... 26201 The State of APIs in Retail 26111 PSD2: 5,000 Banks, 18 Months, and Lots of Work to... 25926 Pitney Bowes and APIs: Tools of the Trade for Craf... 25921 From Proof-of-Concept t