From 0c8ca9e9d415c1f1995b040cd54b423a0d24bf70 Mon Sep 17 00:00:00 2001 From: "quentin.moutte.etu" Date: Thu, 1 Aug 2024 19:22:43 +0200 Subject: [PATCH 1/3] improve the error sentence of MicFileRessource when we don't find the file --- src/Microdown/MicFileResourceReference.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microdown/MicFileResourceReference.class.st b/src/Microdown/MicFileResourceReference.class.st index ad2a8504..8b2634ed 100644 --- a/src/Microdown/MicFileResourceReference.class.st +++ b/src/Microdown/MicFileResourceReference.class.st @@ -63,7 +63,7 @@ MicFileResourceReference >> contents [ [^ self fileReference isDirectory ifTrue: [''] ifFalse: [self fileReference contents] ] on: FileDoesNotExistException do: [ :error | - error resignalAs: (MicResourceReferenceError new messageText: 'Microdown file not found') ] + error resignalAs: (MicResourceReferenceError new messageText: 'The Microdown file at "', self fullName , '" are not found') ] ] { #category : 'accessing' } From 6c4e60116482c4a273e535e9b40100e8564338b7 Mon Sep 17 00:00:00 2001 From: "quentin.moutte.etu" Date: Thu, 1 Aug 2024 19:27:00 +0200 Subject: [PATCH 2/3] Fix the test LoadNotFoundMicrodown after change the sentence of the MicFileReferenceError --- src/Microdown-Tests/MicFileResourceReferenceTest.class.st | 2 +- src/Microdown/MicFileResourceReference.class.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st index a58b5c41..d1b585d0 100644 --- a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st @@ -277,7 +277,7 @@ MicFileResourceReferenceTest >> testLoadNotFoundMicrodown [ ref loadMicrodown. self fail ] on: Error do: [ :e | - self assert: e messageText equals: 'Microdown file not found' ] + self assert: e messageText equals: 'The Microdown file at "/readme.md" are not found' ] ] { #category : 'tests' } diff --git a/src/Microdown/MicFileResourceReference.class.st b/src/Microdown/MicFileResourceReference.class.st index 8b2634ed..a8f2dd15 100644 --- a/src/Microdown/MicFileResourceReference.class.st +++ b/src/Microdown/MicFileResourceReference.class.st @@ -63,7 +63,7 @@ MicFileResourceReference >> contents [ [^ self fileReference isDirectory ifTrue: [''] ifFalse: [self fileReference contents] ] on: FileDoesNotExistException do: [ :error | - error resignalAs: (MicResourceReferenceError new messageText: 'The Microdown file at "', self fullName , '" are not found') ] + error resignalAs: (MicResourceReferenceError new messageText: 'The Microdown file at "', self fullName , '" are not found') ] ] { #category : 'accessing' } From 84ad33f194109b54b013a46587a147cc1b20e657 Mon Sep 17 00:00:00 2001 From: "quentin.moutte.etu" Date: Sat, 3 Aug 2024 19:02:57 +0200 Subject: [PATCH 3/3] Change the error sentence of MicFileRessourceReferenceError to singular --- src/Microdown-Tests/MicFileResourceReferenceTest.class.st | 2 +- src/Microdown/MicFileResourceReference.class.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st index d1b585d0..147aacb8 100644 --- a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st @@ -277,7 +277,7 @@ MicFileResourceReferenceTest >> testLoadNotFoundMicrodown [ ref loadMicrodown. self fail ] on: Error do: [ :e | - self assert: e messageText equals: 'The Microdown file at "/readme.md" are not found' ] + self assert: e messageText equals: 'The Microdown file at "/readme.md" is not found' ] ] { #category : 'tests' } diff --git a/src/Microdown/MicFileResourceReference.class.st b/src/Microdown/MicFileResourceReference.class.st index a8f2dd15..e26acd65 100644 --- a/src/Microdown/MicFileResourceReference.class.st +++ b/src/Microdown/MicFileResourceReference.class.st @@ -63,7 +63,7 @@ MicFileResourceReference >> contents [ [^ self fileReference isDirectory ifTrue: [''] ifFalse: [self fileReference contents] ] on: FileDoesNotExistException do: [ :error | - error resignalAs: (MicResourceReferenceError new messageText: 'The Microdown file at "', self fullName , '" are not found') ] + error resignalAs: (MicResourceReferenceError new messageText: 'The Microdown file at "', self fullName , '" is not found') ] ] { #category : 'accessing' }