PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
← All changes | src/Donors/Repositories/DonorNotesRepository.php +6 -3 4.15.0 → 4.18.0 View file →
@@ -38,8 +38,9 @@
38 38 ->get();
39 39 }
40 40
41 41 /**
42 + * @since 4.18.0 Keep the original error as the previous exception when the write fails.
42 43 * @since 4.4.0
43 44 *
44 45 * @throws Exception
45 46 */
@@ -83,9 +84,9 @@
83 84 DB::rollback();
84 85
85 86 Log::error('Failed creating a donor note', compact('donorNote'));
86 87
87 - throw new $exception('Failed creating a donor note');
88 + throw new Exception('Failed creating a donor note', 0, $exception);
88 89 }
89 90
90 91 DB::commit();
91 92
@@ -95,8 +96,9 @@
95 96 Hooks::doAction('givewp_donor_note_created', $donorNote);
96 97 }
97 98
98 99 /**
100 + * @since 4.18.0 Keep the original error as the previous exception when the write fails.
99 101 * @since 4.4.0
100 102 *
101 103 * @throws Exception
102 104 */
@@ -123,9 +125,9 @@
123 125 DB::rollback();
124 126
125 127 Log::error('Failed updating a donor note', compact('donorNote'));
126 128
127 - throw new $exception('Failed updating a donor note');
129 + throw new Exception('Failed updating a donor note', 0, $exception);
128 130 }
129 131
130 132 DB::commit();
131 133
@@ -132,8 +134,9 @@
132 134 Hooks::doAction('givewp_donor_note_updated', $donorNote);
133 135 }
134 136
135 137 /**
138 + * @since 4.18.0 Keep the original error as the previous exception when the write fails.
136 139 * @since 4.4.0
137 140 *
138 141 * @throws Exception
139 142 */
@@ -155,9 +158,9 @@
155 158 DB::rollback();
156 159
157 160 Log::error('Failed deleting a donor note', compact('donorNote'));
158 161
159 - throw new $exception('Failed deleting a donor note');
162 + throw new Exception('Failed deleting a donor note', 0, $exception);
160 163 }
161 164
162 165 DB::commit();
163 166