Ignore:
Timestamp:
2019-07-02T10:59:39Z (5 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
09170ab8
Parents:
239d25b
Message:

cpp: add stub exception support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/__bits/thread/packaged_task.hpp

    r239d25b r4d68584  
    3030#define LIBCPP_BITS_THREAD_PACKAGED_TASK
    3131
     32#include <__bits/exception.hpp>
    3233#include <__bits/functional/function.hpp>
    3334#include <__bits/thread/future.hpp>
     
    8485                    if (!state_->is_set())
    8586                    {
    86                         // TODO: store future_error
     87                        state_->set_exception(make_exception_ptr(
     88                            future_error{make_error_code(future_errc::broken_promise)}
     89                        ));
    8790                        state_->mark_set(true);
    8891                    }
     
    162165                    state_->set_value(invoke(func_, args...));
    163166                }
    164                 catch(...)
    165                 {
    166                     // TODO: store it
     167                catch(const exception& __exception)
     168                {
     169                    state_->set_exception(make_exception_ptr(__exception));
    167170                }
    168171            }
Note: See TracChangeset for help on using the changeset viewer.