@@ -312,7 +312,8 @@ inline void set_zero_adjoint(Output&& output) {
312312 } else if constexpr (is_stan_scalar_v<output_i_t >) {
313313 output_i.adj () = 0 ;
314314 } else {
315- throw std::domain_error (" INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
315+ throw std::domain_error (
316+ " INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
316317 " not able to deduce the actions needed for the given type." );
317318 }
318319 },
@@ -355,8 +356,9 @@ inline void collect_adjoints(Output& output, Input&& input) {
355356 input_i.adj () = 0 ;
356357 }
357358 } else {
358- throw std::domain_error (" INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
359- " not able to deduce the actions needed for the given type." );
359+ throw std::domain_error (
360+ " INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
361+ " not able to deduce the actions needed for the given type." );
360362 }
361363 },
362364 std::forward<Output>(output), std::forward<Input>(input));
@@ -807,9 +809,9 @@ inline void collect_adjoints(Output&& output, Input&& input) {
807809 } else if constexpr (is_stan_scalar_v<output_i_t >) {
808810 output_i += input_i;
809811 } else {
810- throw std::domain_error (" INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
811- " not able to deduce the actions needed for the given type. " );
812-
812+ throw std::domain_error (
813+ " INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
814+ " not able to deduce the actions needed for the given type. " );
813815 }
814816 },
815817 std::forward<Output>(output), std::forward<Input>(input));
@@ -856,8 +858,9 @@ inline void copy_compute_s2(Output&& output, Input&& input) {
856858 input_i.adj () = 0 ;
857859 }
858860 } else {
859- throw std::domain_error (" INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
860- " not able to deduce the actions needed for the given type." );
861+ throw std::domain_error (
862+ " INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
863+ " not able to deduce the actions needed for the given type." );
861864 }
862865 },
863866 std::forward<Output>(output), std::forward<Input>(input));
@@ -913,11 +916,12 @@ inline constexpr auto make_zeroed_arena(Input&& input) {
913916template <typename Output, typename Input>
914917inline void collect_adjoints (Output&& output, const vari* ret, Input&& input) {
915918 if constexpr (is_tuple_v<Output>) {
916- throw std::domain_error (" INTERNAL ERROR:(laplace_marginal_lpdf)"
917- " Accumulate Adjoints called on a tuple, but tuples cannot be "
918- " on the reverse mode stack!"
919- " This is an internal error, please report it to the stan "
920- " github as an issue." );
919+ throw std::domain_error (
920+ " INTERNAL ERROR:(laplace_marginal_lpdf)"
921+ " Accumulate Adjoints called on a tuple, but tuples cannot be "
922+ " on the reverse mode stack!"
923+ " This is an internal error, please report it to the stan "
924+ " github as an issue." );
921925 } else if constexpr (is_std_vector_v<Output>) {
922926 if constexpr (!is_var_v<value_type_t <Output>>) {
923927 const auto output_size = output.size ();
0 commit comments