Improve script to handle errors
This commit is contained in:
parent
d28acfdb20
commit
3079bbb934
2 changed files with 101 additions and 69 deletions
|
@ -266,7 +266,8 @@ export class Changes {
|
|||
|
||||
public CreateChangesetObjects(
|
||||
changes: ChangeDescription[],
|
||||
downloadedOsmObjects: OsmObject[]
|
||||
downloadedOsmObjects: OsmObject[],
|
||||
ignoreNoCreate: boolean = false
|
||||
): {
|
||||
newObjects: OsmObject[]
|
||||
modifiedObjects: OsmObject[]
|
||||
|
@ -314,6 +315,9 @@ export class Changes {
|
|||
}
|
||||
if (change.changes === undefined) {
|
||||
// This object is a change to a newly created object. However, we have not seen the creation changedescription yet!
|
||||
if(ignoreNoCreate){
|
||||
continue
|
||||
}
|
||||
throw "Not a creation of the object: " + JSON.stringify(change)
|
||||
}
|
||||
// This is a new object that should be created
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue