1.2 KiB
title |
---|
Part raise methods |
A part's different raise
methods are used to bring information to the attention
of the user, or developer. You can think of them as logging methods the register
data.
FreeSewing v3 breaking changes
This behavior is likely to change in FreeSewing v3. Refer to the roadmap for details.
There are four different types of information with their own method:
Practically, the pattern object has an events
property as such:
events: {
debug: [],
error: [],
info: [],
warning: []
}
Calling the relevant raise
method will add the data you pass to it to the relevant array.
For example, if we use:
raise.info('Hello')
The result will be:
events: {
debug: [],
error: [],
info: [
'Hello'
],
warning: []
}
Errors are not harmless, the rest is
It's important to note that only the error
type has an impact.
The other types merely add information to the pattern.
But if an error is raised, core won't attempt to pack the pattern parts on the page. In other words, it will abort after the draft, and not provide a layout.