Closed jorg-vr closed 5 days ago
The changes in this pull request focus on enhancing error handling within the Repository
class located in app/models/repository.rb
. The process_activities
method has been modified to read configuration files from activity directories, filtering out invalid ones while accumulating parsing errors for a consolidated report. A new block of code has been added to handle the outermost directory configuration file, preventing further activity processing if errors are encountered. The method captures ConfigParseError
exceptions, pushing these errors into an errors
array, thereby improving error management without altering method signatures or introducing new methods.
File | Change Summary |
---|---|
app/models/repository.rb | Enhanced process_activities to read and validate configuration files, capturing ConfigParseError exceptions into an errors array. Adjusted logic to prevent processing if configuration files are invalid. |
sequenceDiagram
participant User
participant Repository
participant ConfigParser
User->>Repository: process_activities()
Repository->>ConfigParser: read outermost config
alt ConfigParseError
ConfigParser-->>Repository: raise ConfigParseError
Repository->>Repository: push error to errors array
Repository-->>User: report errors
else No Error
Repository->>ConfigParser: read activity configs
Repository-->>User: process activities
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This pull request fixes a config parser error email not being sent when the error was in the outer
dirconfig.json
Also renamed some variables from
e(xercise)
toa(ctivity)
to please robocop variable reuse issues with thee(rror)
variable