• Keine Ergebnisse gefunden

Exceptions in use

Im Dokument Contracts programming for C++20 (Seite 27-38)

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled. We decouple error identification from error handling. Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation. What do we do on contract violations today?

Ignore reality. Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling. Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation. What do we do on contract violations today?

Ignore reality. Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation. What do we do on contract violations today?

Ignore reality. Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation. What do we do on contract violations today?

Ignore reality. Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation. What do we do on contract violations today?

Ignore reality. Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation.

What do we do on contract violations today?

Ignore reality. Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation.

What do we do on contract violations today?

Ignore reality. Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation.

What do we do on contract violations today?

Ignore reality.

Document. Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation.

What do we do on contract violations today?

Ignore reality.

Document.

Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation.

What do we do on contract violations today?

Ignore reality.

Document.

Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Exceptions in use

When afailurehappens, we use exceptions as an error reporting mechanism.

Notify that an error has occurred and needs to be handled.

We decouple error identification from error handling.

Example: Throwingbad_alloc.

When library detects anassumption was not met, it needs a mechanism to react.

Assumption not metcontract violation.

What do we do on contract violations today?

Ignore reality.

Document.

Throw exceptions.

Robustnessandcorrectnessare orthogonal properties andshould be managed independently.

Contracts programming for C++20 Introduction

Im Dokument Contracts programming for C++20 (Seite 27-38)

ÄHNLICHE DOKUMENTE