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/shared_state.hpp

    r239d25b r4d68584  
    7676            }
    7777
    78             void set_exception(exception_ptr ptr)
     78            void set_exception(exception_ptr ptr, bool set = true)
    7979            {
    8080                exception_ = ptr;
    81                 has_exception_ = true;
     81                has_exception_ = set;
    8282            }
    8383
     
    8989            void throw_stored_exception() const
    9090            {
    91                 // TODO: implement
     91                if (has_exception_)
     92                    rethrow_exception(exception_);
    9293            }
    9394
     
    266267                            }
    267268                        }
    268                         catch(...) // TODO: Any exception.
     269                        catch(const exception& __exception)
    269270                        {
    270                             // TODO: Store it.
     271                            this->set_exception(make_exception_ptr(__exception));
    271272                        }
    272273                    }
     
    351352                    }
    352353                }
    353                 catch(...)
     354                catch(const exception& __exception)
    354355                {
    355                     // TODO: Store it.
     356                    this->set_exception(make_exception_ptr(__exception));
    356357                }
    357358            }
Note: See TracChangeset for help on using the changeset viewer.