From 823516a31caecd5c9de68d56d1464eb46c0dd8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Tich=C3=A1k?= Date: Fri, 2 Feb 2024 14:57:16 +0100 Subject: [PATCH 1/2] description how to terminate o2 --- Framework/Core/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Framework/Core/README.md b/Framework/Core/README.md index 70a35ddbaaf9d..c66b33adbe9e4 100644 --- a/Framework/Core/README.md +++ b/Framework/Core/README.md @@ -277,6 +277,8 @@ however, no API is provided to explicitly send it. All the created DataChunks ar When an error happens during processing of some data, the writer of the `process` function should simply throw an exception. By default the exception is caught by the `DataProcessingDevice` and a message is printed (if `std::exeception` derived `what()` method is used, otherwise a generic message is given). Users can provide themselves an error handler by specifying via the `onError` callback specified in `DataProcessorSpec`. This will allow in the future to reinject data into the flow in case of an error. +When the exception is thrown inside processing function it's message and stack trace is printed. However, the application itself is not terminated. If the error encountered is so severe that current workflow cannot continue it is advisable to call `LOG(fatal)` with proper describing message, which makes the application shutdown with non zero error code. + ### Services Services are utility classes which `DataProcessor`s can access to request out-of-bound, deployment dependent, functionalities. For example a service could be used to post metrics to the monitoring system or to get a GPU context. The former would be dependent on whether you are running on your laptop (where monitoring could simply mean print out metrics on the command line) or in a large cluster (where monitoring probably means to send metrics to an aggregator device which then pushes them to the backend. From 173b6440e9c87ac5c14e78372358f1f41f9f6e04 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:01:15 +0200 Subject: [PATCH 2/2] Update Framework/Core/README.md --- Framework/Core/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/Core/README.md b/Framework/Core/README.md index c66b33adbe9e4..8d3ad9db01135 100644 --- a/Framework/Core/README.md +++ b/Framework/Core/README.md @@ -277,7 +277,7 @@ however, no API is provided to explicitly send it. All the created DataChunks ar When an error happens during processing of some data, the writer of the `process` function should simply throw an exception. By default the exception is caught by the `DataProcessingDevice` and a message is printed (if `std::exeception` derived `what()` method is used, otherwise a generic message is given). Users can provide themselves an error handler by specifying via the `onError` callback specified in `DataProcessorSpec`. This will allow in the future to reinject data into the flow in case of an error. -When the exception is thrown inside processing function it's message and stack trace is printed. However, the application itself is not terminated. If the error encountered is so severe that current workflow cannot continue it is advisable to call `LOG(fatal)` with proper describing message, which makes the application shutdown with non zero error code. +When the exception is thrown inside processing function its message and stack trace is printed. However, the application itself is not terminated. If the error encountered is so severe that current workflow cannot continue it is advisable to call `LOG(fatal)` with proper describing message, which makes the application shutdown with non zero error code. ### Services