simplified
This commit is contained in:
@ -20,17 +20,7 @@ class konto {
|
||||
}
|
||||
|
||||
ueberweissen([konto]$nach, [double]$menge) {
|
||||
$stand_von = $this.guthaben
|
||||
$stand_nach = $nach.guthaben
|
||||
try {
|
||||
$this.auszahlen($menge)
|
||||
$nach.einzahlen($menge)
|
||||
}
|
||||
catch {
|
||||
$this.guthaben = $stand_von
|
||||
$nach.guthaben = $stand_nach
|
||||
throw $_
|
||||
}
|
||||
[konto]::ueberweissen($this, $nach, $menge)
|
||||
}
|
||||
|
||||
konto() {
|
||||
|
||||
Reference in New Issue
Block a user