Skip to content

Commit

Permalink
[All] Don't hide original error when failing to scan an assembly for …
Browse files Browse the repository at this point in the history
…plugin

Related to #3511
  • Loading branch information
MangelMaxime committed Sep 19, 2024
1 parent 0bb4ff2 commit b93f248
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Fable.Cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

* [Python] Remove `$` sign when reporting an error from `assert_equal` and `assert_not_equal` (#3878) (by @joprice)
* [All] Don't hide original error when failing to scan an assembly for plugin (#3896) (by @MangelMaxime)

### Fixed

Expand Down
4 changes: 4 additions & 0 deletions src/Fable.Compiler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Changed

* [All] Don't hide original error when failing to scan an assembly for plugin (#3896) (by @MangelMaxime)

## 4.0.0-alpha-012 - 2024-06-17

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions src/Fable.Transforms/State.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ type Assemblies(getPlugin, fsharpAssemblies: FSharpAssembly list, addLog: Severi
|> Seq.exists (fun attr ->
attr.AttributeType.TryFullName = Some "Fable.ScanForPluginsAttribute"
)
with _ ->
with error ->
// To help identify problem, log information about the exception
// but keep the process going to mimic previous Fable behavior
// and because these exception seems harmless
let errorMessage =
$"Could not scan {path} for Fable plugins, skipping this assembly"
$"Could not scan {path} for Fable plugins, skipping this assembly. Original error: {error.Message}"

addLog Severity.Info errorMessage

Expand Down

0 comments on commit b93f248

Please sign in to comment.