You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
После ВызватьИсключение; в фоновом задании терялись исходные кадры стека: VM уже сохраняла их перед переходом в BSL-обработчик, а BackgroundTask заменял этот снимок текущим, после раскрутки. Например, ГлубокаяОшибка → ПромежуточныйМетод → ФоновыйМетод превращался в один ФоновыйМетод.
Теперь существующий RuntimeSpecificInfo сохраняется; текущие кадры VM запрашиваются только при его отсутствии. Добавлены четыре проверки: без перехвата, повторный выброс из процедуры и функции, два последовательных повторных выброса. Проверяются порядок кадров и исходная позиция ошибки.
На Windows прошли 297 Core-тестов в Release (1 пропущен) и все 27 BSL-тестов tasks.os на свежесобранном движке.
Summary by CodeRabbit
Bug Fixes
Background task errors now preserve the original exception details, including stack frames and source location, for more consistent error reporting.
No actionable comments were generated in the recent review.
Walkthrough
Background tasks now retain existing RuntimeSpecificInfo on caught script exceptions and use process execution frames only when that information is null. New tests cover direct and rethrown exceptions and verify task status, exception details, and frame metadata.
Changes: Background task exception handling
Layer / File(s)
Summary
Preserve exception frames and verify propagation src/OneScript.StandardLibrary/Tasks/BackgroundTask.cs, src/Tests/OneScript.Core.Tests/BackgroundTaskExceptionTests.cs
BackgroundTask now fills RuntimeSpecificInfo from process execution frames only when the field is null. Tests cover four exception propagation paths and check the task error state, exception description, stack methods, and original-frame metadata.
Background tasks now keep the original error stack when an exception is rethrown. The change is small, localized and covered by new tests, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "Сохранение исходного стека ошибки фонового задания при повторном выбросе" (preserving the original background-task error stack when rethrowing) matches the main change. BackgroundTask.Execu…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "Сохранение исходного стека ошибки фонового задания при повторном выбросе" (preserving the original background-task error stack when rethrowing) matches the main change. BackgroundTask.ExecuteOnCurrentThread now keeps existing RuntimeSpecificInfo on a caught ScriptException instead of replacing it with the current stack, and the added tests check that the original stack frames are retained for rethrows. The title is specific and concise, and it names the primary behavior change.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
После
ВызватьИсключение;в фоновом задании терялись исходные кадры стека: VM уже сохраняла их перед переходом в BSL-обработчик, аBackgroundTaskзаменял этот снимок текущим, после раскрутки. Например,ГлубокаяОшибка → ПромежуточныйМетод → ФоновыйМетодпревращался в одинФоновыйМетод.Теперь существующий
RuntimeSpecificInfoсохраняется; текущие кадры VM запрашиваются только при его отсутствии. Добавлены четыре проверки: без перехвата, повторный выброс из процедуры и функции, два последовательных повторных выброса. Проверяются порядок кадров и исходная позиция ошибки.На Windows прошли 297 Core-тестов в Release (1 пропущен) и все 27 BSL-тестов
tasks.osна свежесобранном движке.Summary by CodeRabbit