try
{
concurrency::streams::fstream::open_istream("myfile.txt");
}
catch(...)
{
std::cout << "Exception Caught \n";
}
I am writing one sample client which upload file , but this line return exception.
After debugging more, there is exception:
raise (sig=) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x0000563bf617ced4 in pplx::details::_ExceptionHolder::~_ExceptionHolder (this=0x7f6d34000c90, __in_chrg=) at /usr/include/pplx/pplxtasks.h:952
#2 0x0000563bf61a2ec6 in __gnu_cxx::new_allocatorpplx::details::_ExceptionHolder::destroypplx::details::_ExceptionHolder (this=0x7f6d34000c90, __p=0x7f6d34000c90)
at /usr/include/c++/9/ext/new_allocator.h:153
#3 0x0000563bf619fa5b in std::allocator_traits<std::allocatorpplx::details::_ExceptionHolder >::destroypplx::details::_ExceptionHolder (__a=..., __p=0x7f6d34000c90)
at /usr/include/c++/9/bits/alloc_traits.h:497
#4 0x0000563bf619b119 in std::_Sp_counted_ptr_inplace<pplx::details::_ExceptionHolder, std::allocatorpplx::details::_ExceptionHolder, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x7f6d34000c80) at /usr/include/c++/9/bits/shared_ptr_base.h:557
#5 0x0000563bf6185c22 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f6d34000c80) at /usr/include/c++/9/bits/shared_ptr_base.h:155
#6 0x0000563bf618281b in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x563bf672d378, __in_chrg=)
at /usr/include/c++/9/bits/shared_ptr_base.h:730
#7 0x0000563bf617d510 in std::__shared_ptr<pplx::details::_ExceptionHolder, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x563bf672d370, __in_chrg=)
at /usr/include/c++/9/bits/shared_ptr_base.h:1169
#8 0x0000563bf617d530 in std::shared_ptrpplx::details::_ExceptionHolder::~shared_ptr (this=0x563bf672d370, __in_chrg=)
at /usr/include/c++/9/bits/shared_ptr.h:103
#9 0x0000563bf617d778 in pplx::details::_Task_impl_base::~_Task_impl_base (this=0x563bf672d360, __in_chrg=) at /usr/include/pplx/pplxtasks.h:1718
#10 0x0000563bf619f15a in pplx::details::_Task_impl::~_Task_impl (this=0x563bf672d360, __in_chrg=) at /usr/include/pplx/pplxtasks.h:2425
#11 0x0000563bf61a2c49 in __gnu_cxx::new_allocator<pplx::details::_Task_impl >::destroy<pplx::details::_Task_impl > (this=0x563bf672d360,
__p=0x563bf672d360) at /usr/include/c++/9/ext/new_allocator.h:153
#12 0x0000563bf619f795 in std::allocator_traits<std::allocator<pplx::details::_Task_impl > >::destroy<pplx::details::_Task_impl > (__a=...,
__p=0x563bf672d360) at /usr/include/c++/9/bits/alloc_traits.h:497
#13 0x0000563bf619a97d in std::_Sp_counted_ptr_inplace<pplx::details::_Task_impl, std::allocator<pplx::details::_Task_impl >, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x563bf672d350) at /usr/include/c++/9/bits/shared_ptr_base.h:557
#14 0x0000563bf6185c22 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x563bf672d350) at /usr/include/c++/9/bits/shared_ptr_base.h:155
#15 0x0000563bf618281b in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7ffdd6967538, __in_chrg=)
at /usr/include/c++/9/bits/shared_ptr_base.h:730
#16 0x0000563bf617edfa in std::__shared_ptr<pplx::details::_Task_impl, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7ffdd6967530,
__in_chrg=) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
#17 0x0000563bf617ee1a in std::shared_ptr<pplx::details::_Task_impl >::~shared_ptr (this=0x7ffdd6967530, __in_chrg=)
at /usr/include/c++/9/bits/shared_ptr.h:103
#18 0x0000563bf617ee3a in pplx::task::~task (this=0x7ffdd6967530, __in_chrg=) at /usr/include/pplx/pplxtasks.h:3238
#19 0x0000563bf617fd24 in pplx::task::~task (this=0x7ffdd6967530, __in_chrg=) at /usr/include/pplx/pplxtasks.h:4323
#20 0x0000563bf61782ed in main () at cpluscplusRest.cpp:13