-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add better exception support to PlatformMappingFunction.
Work towards platform-based flags: #19409. PiperOrigin-RevId: 598953443 Change-Id: I55cd314ee644934032a39d7d23dd9a742fe2c0f7
- Loading branch information
1 parent
611fdbb
commit 4a6f896
Showing
7 changed files
with
184 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/google/devtools/build/lib/skyframe/config/PlatformMappingException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2024 The Bazel Authors. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
package com.google.devtools.build.lib.skyframe.config; | ||
|
||
import com.google.devtools.build.lib.actions.MissingInputFileException; | ||
import java.io.IOException; | ||
|
||
/** Exception class for errors while computing platform mappings. */ | ||
public final class PlatformMappingException extends Exception { | ||
PlatformMappingException(MissingInputFileException cause) { | ||
super(cause); | ||
} | ||
|
||
PlatformMappingException(IOException cause) { | ||
super(cause); | ||
} | ||
|
||
PlatformMappingException(PlatformMappingParsingException cause) { | ||
super(cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...n/java/com/google/devtools/build/lib/skyframe/config/PlatformMappingParsingException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2024 The Bazel Authors. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
package com.google.devtools.build.lib.skyframe.config; | ||
|
||
import com.google.devtools.build.skyframe.SkyFunctionException; | ||
import com.google.devtools.common.options.OptionsParsingException; | ||
|
||
/** | ||
* Inner wrapper exception to work around the fact that {@link SkyFunctionException} cannot carry a | ||
* message of its own. | ||
*/ | ||
final class PlatformMappingParsingException extends Exception { | ||
|
||
PlatformMappingParsingException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public PlatformMappingParsingException(OptionsParsingException cause) { | ||
super(cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.