Class {
	#name : #BlLayoutErrorHandler,
	#superclass : #BlSingleErrorHandler,
	#category : #'Bloc-Basic-Errors'
}

{ #category : #testing }
BlLayoutErrorHandler >> matches: aFramePhase [
	^ aFramePhase isLayoutPhase
]

{ #category : #'error handling' }
BlLayoutErrorHandler >> processError: aBlHandledError [
	NonInteractiveTranscript stderr
		show: aBlHandledError;
		cr.

	aBlHandledError debug
]

Class {
	#name : #BlLayoutErrorHandler,
	#superclass : #BlSingleErrorHandler,
	#category : #'Bloc-Basic-Errors'
}

{ #category : #testing }
BlLayoutErrorHandler >> matches: aFramePhase [
	^ aFramePhase isLayoutPhase
]

{ #category : #'error handling' }
BlLayoutErrorHandler >> processError: aBlHandledError [
	NonInteractiveTranscript stderr
		show: aBlHandledError;
		cr.
		
	"Temporary reset the layout of the parent if it's an infinite element.
	Should be replaced with a more generic solution."
	aBlHandledError element
		withAllParentsDo: [ :aParentElement | 
			(aParentElement isKindOf: BlInfiniteElement)
				ifTrue: [ aParentElement state beStepStart ] ].

	aBlHandledError debug
]

Clear the state of all parent infinite elements when an error happens inside the layout step.
Clear the state of all parent infinite elements when an error happens inside the layout step.
pharo-graphics/Bloc